Sunday, July 29, 2018

Top 15 Java Multithreading, Concurrency Interview Questions Answers asked in Investment banks

Multi-threading and concurrency questions are an essential part of any Java interview. If you are going for any Java interview on any Investment bank e.g. Barclays, Citibank, Morgan Stanley etc for Cash Equities Front Office Java Developer position, you can expect a lot of multi-threading interview questions on your way. Multi-threading and concurrency are favorite topics on Investment banking interviews,  especially on electronic trading development jobs and they grill candidate on many tricky java thread interview questions. They just want to ensure that the guy has solid knowledge of multi-threading and concurrent programming in Java because most of them are in the business of performance which provides them a competitive advantage and it's hard to write correct and robust concurrent code.

Top 5 Java Performance Tuning Books for Experienced Programmers - Best of Lot, Must read

You might be thinking, why should a Java developer read a book on Performance tuning? When I first faced this question a long time back, I thought I will do it later, but I never got back to that for a long time. I realize my mistake of having a lack of knowledge on memory measurement, JVM tuning, and finding bottleneck only when I faced serious performance and scalability issues on our mission-critical, server-side financial application written in Java. It's true that when you really need it you learn most, but those times are not the best time to learn fundamentals, in fact, those times are to apply and correct your misunderstanding.

Saturday, July 28, 2018

Top 5 Websites to Learn Coding in Java Online for FREE - Best of lot

Begin an author of a Java blog, I often receive questions like how to improve my coding skills?,  or how do I learn to code in Java?, or I am having difficulty solving programming problems, please help etc. This is mostly from programmers, who has just started programming or a graduate with programming degree or even some programmers with a year or two in Job. Like many other things in the world, to improve coding you need to code, code, and code - and to improve programming you need to write a program, and that's where many of these programmers fail. In 90% cases, they simply don't write enough program to develop programming logic and code sense and if without too much experience at data structures and algorithms, if they attempt problems given on sites like TopCoder, or Project Euler, they fail miserably.

Friday, July 27, 2018

Does Oracle's Java Certifications like OCAJP, OCEJWCD, or OCPJP helps in Job and Career?

Being the author of a Java blog and a certified Java programmer, I receive lots of questions about the usefulness of Java certifications like SCJP, now known as OCJP or OCPJP. Questions like, does getting a Java Certification helps to land a job, or does certified Java developer earn more or gets better offers, are quite common to Java developers, especially freshers. In this post, I will try to answer a few of these question based on my own experience as a Java blogger and a certified Java developer. Well, I did my first Java Certification, SCJP (Sun Certification for Java Programmers) along back when SCJP 1.4 was hot and after scoring 100% on that I did two more Java certifications i.e. my SCWCD (Sun Certification for Web Component Developer) and SCMAD (Sun Certified Mobile Application Developer). 

Thursday, July 26, 2018

How to do Pagination in Oracle Database - SQL Query With Example

Many time we need SQL query which returns data page by page i.e. 30 or 40 records at a time, which can be specified as page size. In fact, Database pagination is a common requirement of Java web developers, especially dealing with the largest data sets.  In this article, we will see how to query Oracle 10g database for pagination or how to retrieve data using paging from Oracle. Many Java programmer also uses display tag for paging in JSP which supports both internal and external paging. In case of internal paging, all data is loaded into memory in one shot and display tag handles pagination based upon page size but it only suitable for small data where you can afford those many objects in memory.

Top 5 Best Java 8 Tutorials, Courses, and Books

It's been quite some time since the Java 8 was released but Java community is still buzzing with functional programming and lambda expression. Many developers, programmers, and bloggers have already shared lots of really good tutorial to learn lambda expressions, probably the biggest thing in Java world after Generic was introduced in Java 5. While the term "lambda expression" may sound abstract and academic, Java 8 Lambdas can have a big impact on how you program every day. Java 8 has not only introduced Lambda expressions but also Stream API, Functional interfaces, new Date and Time API and default methods, which has completely changed the way you write your Java code. As a professional Java developer, you will have to learn Java 8 one day, and it's better to do sooner than later.

Wednesday, July 25, 2018

2 Books to Prepare Oracle Java Certification Exams - OCA and OCP Java SE 6,7, 8 OCPJP 8

There was a time when Sun Certification was very hot and programmers feel proud of being Sun Certified Java Professional(SCJP). After Oracle took over Sun in early 2010, it changed names of all the examination from SCJP to OCPJP or OCJP, and now OCA and OCP for Java SE 7 and Java SE 8. I see there is a lot of confusion among certification nowadays, but essentially they are of the same level at previous SCJP. Since Java gets new language feature with every new release, subsequently a new certification title is introduced. I am not agreed with upgrading your Java certification with every release, it doesn't make much sense to me, but many programmers prefer to get certified and keep it updated.

10 Object Oriented Design Principles Java Programmer should know

The Object-Oriented Design Principles are the core of OOP programming, but I have seen most of the Java programmers chasing design patterns like Singleton pattern, Decorator pattern or Observer pattern, and not putting enough attention on learning Object-oriented analysis and design. It's important to learn basics of Object-oriented programming like Abstraction, Encapsulation, Polymorphism, and Inheritance. But, at the same time, it's equally important to know object-oriented design principles, to create the clean and modular design. I have regularly seen Java programmers and developers of various experience level, who either don't hear about these OOP and SOLID design principle, or simply doesn't know what benefits a particular design principle offers, or how to apply these design principle in coding. 

Tuesday, July 24, 2018

10 Tips To Work Fast and Improve Productivity in Bash, UNIX and Linux

Have you ever amazed to see someone working very fast in UNIX, firing commands and doing things quickly? Yes, I have seen that a couple of times and I have always inspired to learn from those superstar developers. In this article or tutorial or whatever you call it, I have dedicated to sharing some UNIX command practices I follow to work fast, quick, or efficiently in Linux. I work for Financial services industry and my work involves development and support of online stock and futures trading application in Electronic trading, Derivatives etc. All our services run on Linux servers so it's very important for me to work efficiently and quickly in Linux machine and that's how I have learned these productivity tips in Linux.

Monday, July 23, 2018

Spring Security Concurrent Session Control Example Tutorial - How to Limit Number of User Session in Java JEE Web Application

If you don't know, Spring security can limit the number of sessions a user can have in a Java web application. If you are developing a web application especially a secure web application in Java JEE then you must have come up with the requirement similar to many online banking portals have like only one session per user at a time or no concurrent session per user. If the user tries to open a new session then either an alert is shown or his previous session is closed. Even though you can also implement this functionality without using spring security but with Spring security, its just piece of cake with coffee :).  You just need to add a couple of lines of XML in your spring security configuration file and you are done. In order to implement this functionality, you can use the <concurrency-control> tag.

Sunday, July 22, 2018

How to setup JNDI Database Connection pool in Tomcat - Spring Tutorial Example

Setting the JNDI Database Connection pool in Spring and Tomcat is pretty easy. Tomcat server documentation gives enough information on how to setup connection pool in Tomcat 5, 6 or 7. Here we will use Tomcat 7 along with spring framework for creating a connection pool in Tomcat server and accessing them in Spring using JNDI code. In our last article, we have seen how to setup database connection pool in Spring for core Java application which doesn't run on a web server or application server and doesn't have managed J2EE container. but if you are developing a web application than its better to use server managed connection pool and access them using JNDI. Spring configuration will be generic and just based on JNDI name of Datasource so it will work on any J2EE Server e.g. Glassfish, WebLogic, JBoss or WebSphere until JNDI name is same. 

Saturday, July 21, 2018

Why become a Certified Java Programmer? Does Oracle Certified Professional Earn more?

I have seen many Java programmers in doubt whether to go for Java certifications or not? Whether getting Java certified will help them to earn a better salary? or after becoming Java certified from Oracle will help them to get a Job. In this article, we will see what are the benefits of getting Java certified. I know higher income, better Job prospects, and a better chance of promotion is at the top of the benefits of becoming a certified Java professional, but this certification provides much more value than that. Apart from all those tangible benefits, the most important thing is that you learn Java better which help you everywhere like in your day job as well as on interviews.

Friday, July 20, 2018

2 Ways to Setup LDAP Active Directory Authentication in Java - Spring Security Example Tutorial

The LDAP authentication is one of the most popular authentication mechanism around the world for enterprise application and Active directory (an LDAP implementation by Microsoft for Windows) is another widely used LDAP server. In many projects, we need to authenticate against active directory using LDAP by credentials provided in the login screen. Sometimes this simple task gets tricky because of various issues faced during implementation and integration and no standard way of doing LDAP authentication in a Java web application. Even though Java provides LDAP support but in this article, I will mostly talk about spring security because of it's my preferred Java framework for authentication, authorization, and security related stuff.

Thursday, July 19, 2018

Top 9 Java Programming Books - Best of lot, Must Read

These top Java programming books are some of the good books to learn Java and I would say some of them are simply best Java books ever published. Whenever a programmer starts learning Java programming language, the first question he asks is "Which book should I refer to learn Java?", or "What is the best book to learn Java for beginners?" or "Can you tell me some good books to learn Java?" .That itself says how important Java books are for programmers especially beginners.  Despite having so many free resources available in Java like tutorials, tips, blogs and code examples, Java books have their own place because of two reasons:
  • They are written by programmers who are authority in subject
  • They cover the subject with more details and explanation.

Monday, July 16, 2018

Amazon Prime Day 2018 - Great Opportunity to Buy Books and Gadgets for Programmers

Many of my friends and colleagues used to wait until November to buy books, gadgets, and other computer items to get the huge discount offered on Black Friday deals, but you don't need to. Amazon is bringing Black Friday to the summer with their annual Prime Day offers. The Amazon Prime day is nothing but a one-day (precisely one and half day) shopping extravaganza, where you will get huge discounts on thousands of Amazon products including books, games, gadgets, and other computer and electronics items. So, if you are looking to buy a new laptop, a new smartphone or want to track your fitness, you can buy Fitbit and other such gadgets at a much cheaper price on Amazon prime day.

Is "Java Concurrency in Practice" still valid in the era of Java 8 and 10?

One of my reader Shobhit asked this question on my blog post about 12 must-reads advanced Java books for intermediate programmers - part1. I really like the question and thought that many Java programmers might have the same doubt whenever someone recommends them to read Java Concurrency in Practice. When this book came first in 2006, Java world was still not sure of about new concurrency changes made in Java 1.5, I think the first big attempt to improve Java's built-in support for multi-threading and concurrency. Many Java programmers were even not aware of new tools introduced in the API e.g. CountDownLatch, CyclicBarrier, ConcurrentHashMap and much more. The book offered them the seamless introduction of those tools and how they can use them to write high-performance concurrent Java applications.

Thursday, July 5, 2018

Top 5 Advanced SQL Books for Experienced Programmers - Best of lot, Must read

If you an experienced programmer and know how to write SQL queries and database fundamentals but want to take your SQL and database skills to the next level then you have a come to the right place. In this blog, I have shared a lot of free SQL books and courses you can use to start your SQL journey. This is also the second article about SQL books, In the first part, I have shared some of the best SQL books which are essential to learning SQL queries and fundamentals of database e.g. normalization, indexing, and other design stuff, if you haven't read it yet, I suggest to do it now. You will find some amazing book to start learning SQL. In this article, I am going to share some of the best books to learn advanced SQL programming, which can help you to write better SQL queries and understand how database process those queries.

Top 30 Eclipse Keyboard Shortcuts for Java Programmers

This tutorial is about 30 Eclipse keyboard shortcuts, this list is by no means complete and I will suggest you guys share eclipse shortcuts listed other than here to make this more useful. Eclipse is the most used Java development IDE and knowing Eclipse shortcuts not only improve your productivity but also makes you more efficient. You will have more time for things you like to do. Using keyboard shortcuts also helps to impress colleagues and shows that you have a good hold on tools you used for Java Development. If you are a Java developer, who use Eclipse as your main IDE for all-purpose e.g. coding, development, and debugging, then I also suggest you take a look at Beginners Eclipse Java IDE Training Course, one of the best course to learn how to use Eclipse effectively from Java programmer's perspective.

Wednesday, July 4, 2018

Top 30 Java Phone Interview Questions Answers for Freshers, 1 to 2 Years Experienced

In this article, I am sharing 30 core Java technical questions, from screening and phone round of interviews. In telephonic interviews, questions are short, fact-based and Interviewer expects some keyword in answers. Accordingly, I have given very short answers to these question, only main points; just to make this as revision post. I am expecting every Java programmer to know answers to all these Java technical questions if he has more than 4 to 5 years experience. it's only freshers and junior developers who need to do a bit of research to understand topics well. I have tried to include all classical and hugely popular, frequently asked questions from different topics like String, multi-threading, collection, design pattern, object-oriented design, garbage collection, generics and advanced Java concurrency questions. Since core Java interviewer's normally don't ask questions on JSP, Servlets, and other JEE technologies, I have not included them in this list.

Do you Need to Pass OCAJP before taking OCPJP - Java Certification for SE 8 (1Z0-808 and 1Z0-809)

Even though we are now waiting for Java 11, the latest Java certification you can do is Java SE 8 Programmer 1 and 2, also known as OCAJP 8 and OCPJP 8 with exam code 1Z0-808 and 1Z0-809. Even though Oracle split Java certification into 2 after acquiring Sun Microsystem on 2010, there is still confusion among Java developers whether they need to pass just one OCAJP exam, or both OCAJP and OCPJP exam to become a certified Java developer. Well, The short answer is Yes, if you want to become a Java certified engineer than you need to pass both OCAJP and OCPJP but the long answer depends upon your situation e.g. whether you hold any previous Java certification or not, which we'll discuss in the second section.

Tuesday, July 3, 2018

Top 5 books to learn Spring Boot and Spring Cloud for Java Developers - Best of Lot

Hello guys, if you are a Java developer and want to learn Spring Boot and Spring Cloud frameworks and looking for some of the best books and courses then you have come to the right place. In past, I have shared some of the best Spring Boot and Spring Cloud courses and today I am going to talk about some of the best books to learn Spring Boot and Spring Cloud, but before that let's try to understand what is Microservice and how Spring Boot and Spring Cloud help with development of microservices in Java. Microservices is nothing but an extension of RESTful web services with the key idea is to break up your code into small, distributed, and independent services for better management, but it does require a thoughtful design and think through ability.

Monday, July 2, 2018

Top 5 Courses to Learn TypeScript in 2018 - Best of Lot

Hello guys, if you are thinking to learn TypeScript and looking for some awesome resources like books, courses, and tutorials then you have come to the right place. In my last article, I have shared some of the best Angular framework tutorials and courses and today, I am going to share some of the best TypeScript online course you can join to learn it by yourself. Many programmers and web developers are learning TypeScript because of its powerful syntax and advanced OOP features and more importantly to developer Angular based application. Since the Angular team has chosen TypeScript as the official language for Angular development, it's important to know TypeScript if you want to make full use of Angular but that's not the only reason you should learn TypeScript.

Which Programming Books Would You Buy if 100$ is Given to Spend?

Hello Guys, it's time to take a hypothetical question in Javarevisited. I love books and I have so many in my library and on my phone but this time, I am asking for your recommendations. Which programming book, would you love to buy, if you are given 100$ to spend? I know, when it comes to buying, people want to the worth of their money, and that's why I am posting this question to you guys. Suppose you are looking some books in a bookstore and suddenly salesman comes and say, at this particular minute, we are giving you 100$ FREE to buy any programming book. Now you just have 10 minutes to complete your purchase and take away those awesome Java books absolutely for FREE, what are the books you are going to buy?

Sunday, July 1, 2018

10 Reasons to Learn Java Programming Language and Why Java is Best

Java is one of the best programming language created ever, and I am not saying this because I am a passionate Java developer, but Java has proved it in last 20 years. Two decades is a big time for any Programming language, and Java has gained strength every passing day. Though there are times, when Java development slows down, but Java has responded well. Earlier with groundbreaking changes in the form of Enum, Generics, and Autoboxing in Java 5, performance improvement with Java 6, and Google's choice of language for Android apps development keeps Java as a front-line programming language.