Java String 101 - Everything You Want to Know about String in Java

someone might question that why do we need another article about string in Java, haven't we had enough about the string is already written? Yes, I agree there are a lot of articles related to Java string covering topics like how to use Java String, an example of Java string and almost everything you can do with string in Java. But, I wanted to document my experience of using String in Java and some nasty and little-known things I discovered about the Java String class, which may not be obvious to many Java developers. A string is available in almost every programming language and its probably the most used data structure or a data type, hence a good knowledge of String is very important for every Java developers.

50+ Basic Core Java Interview Questions with Hints and Answers

If you are preparing for your next Core Java interview and looking for some common question to practice or check your knowledge, then you have come to the right place. In this article, I'll share 50 Core Java Interview Questions from various companies. I have already discussed the answers to these questions in this blog or Javarevisited, so I have just put the link. First, you should try to answer it yourself and if you cannot then go to the link and find the answer. You can also compare your answer with mine and learn a few things here and there. In most of my interview post, I have also shared some common techniques to drive interview towards your comfort zone and how to leave a long-lasting impression on the interviewer, you can use those techniques to do well on your Java interviews.

Top 50 Java Generics and Collection Interview Questions

Java Collection and Generic are a very important topic for Java Interviews. They also present some of the hardest questions to a programmer when it comes to interviews, especially Generics. It's not easy to first understand what a particular piece of code doing with those question mark and other signs and then the pressure of interviews also makes it hard to answer complex usage of Generics.  But, with proper preparation and paying attention to both Java Collection and Generic, you can solve that hurdle. If you are looking for Java job but hasn't done well in the interviews you have given so far then you have come to the right place. In this blog, I have shared a lot of Java interview questions on various topics and difficulty levels.

How to declare and Initialize two dimensional Array in Java with Example

An array of more than one dimension is known as a multi-dimensional array. Two of the most common examples of multi-dimensional arrays are two and three-dimensional array, known as 2D and 3D array, anything above is rare. I have never seen 4-dimensional arrays, even 3D arrays are not that common. Now the question comes when do use a multi-dimensional array? Any real-life example? Well, 2D arrays are very common on platform games like Super Mario Bros to represent screen or terrain; 2D arrays can also be used to represent structures like a spreadsheet, or to draw board games like Chess, which requires 8x8 board, Checkers and  Tic-Tac-Toe, which requires 3 rows and 3 columns.

Difference between OCAJP7, OCAJP8, and OCAJP11 Certification - 1Z0-803 vs 1Z0-808 vs 1Z0-815

One of the frequently asked questions asked by most of the OCAJP certification candidates is, what are the differences between OCAJP 8 and OCAJP 7? And, after Java 11 certification release, what is the difference between OCAJP 11 (1Z0-815) and OCAJP 8 (1Z0-808) Which one Java developers should go for? OCAJP7 or OCAJP8, or OCAJP 11? The obvious answer to this question is the latest Java version of the exam, I mean OCAJP 11. Since it's already more than a couple of months since Java 12 is out but there is no OCAJP 9 certification, the OCAJP 8 should be the exam, Java developer should pursue this year and beyond. The question is more for those who are looking to become certified Java developer in quick time and doesn't know Java 8 yet like experienced Java developers who have extensively worked in Java SE 6 and prior version but don't have any Java certification yet.

Java - Variable and Method Hiding Example

If Java, if you are not careful you can possibly hide both methods and variables of the superclass. A field or variable is said to hide all fields with the same name in superclasses. Similarly, a static method with the same name in a subclass can hide the method of the superclass. This can lead to subtle bugs, especially if you are expecting a different method to be called. In this article, I'll show you examples of both variable and method hiding in Java so that you can understand and avoid them in the future.

How to use Multiple Threads in Java - Example

Hello guys, Multithreading is one of the biggest strength of Java, which allows you to divide a task and execute faster by using more than one threads. In order to use multiple threads in Java, you need to first define the task which will be executed by those threads. In order to create those task, you can either use Runnable or Callable interface. If you are just learning Java chose the Runnable interface, it's simpler one, but if you are familiar with Java multithreading and want to leverage additional features offered by Callable like it can throw an exception and it can also return value, then go ahead and use the Callable interface. Once you have task ready, you need to create an instance of the Thread class.

Can you join two unrelated tables in SQL? Cross Join Example

In one of the recent programming job interview, one of my readers was asked the question, how do you join two tables which are not related to each other? i.e. they don't have any common column? is it possible in SQL? My reader got confused because he only knows about INNER join and OUTER join which require a key column like dept_id which is the primary key in one table like Department and foreign key in another table like Employee. He couldn't answer the question, though he did tell them about you can select data from multiple tables by typing multiple table names in from clause using a comma. What he was saying was right, but he didn't know much about it, so he couldn't explain it confidently. Lucky for him, he got the job but he emailed me asking the same question which inspired me to write this post.