Category: Core Java

List of Interview Questions on Java for freshers and experienced candidates asked in technical job interviews in IT Industries. This list includes interview questions asked to freshers, 2,3 and 5 years etc. experience professionals | Only Real.

This section contains technical java interview questions and answers for freshers and experienced on java Polymorphims, Java OOPs concept Inheritance, Interface, abstract class, abstraction and encapsulation, classes and objects etc. with impressive answers and explanation. In fact, interview question on many topics I have provided that you should read or brush up that help crack java technical java interviews quickly.

What is difference between constructor and method in Java? Explain with code example

Answer of what is difference between constructor and method in JAVA programming includes differences with code example. Interview question: Explain difference between constructor and method of a class in java program. explain your points with code by writing a simple class. Also, write code how constructor initializes objects. Answer: Constructor Vs Method Point-1: Constructor must…

Read the full article

When to Use StringBuffer and StringBuilder class in Java Programming

We should use StringBuffer for multi-threaded java program or else Stringbuilder class. The difference between StringBuffer and StringBuilder class in java is that StringBuffer is synchronized, whereas, StringBuilder is not. In multithreading application, if a buffer is shared among multiple threads, then we should consider using StringBuffer as all of its methods are synchronized and…

Read the full article

What is literals in java Programming? Explain with Example

Literals in Java programming is a constant value which is compatible to a data type, programmers assign to a variable that compiler understand. It is used to assign a value to variables, to compare values or define constants. Literals are often used to initialize variables. Literals represent numerical (integer or floating-point), character, boolean or string…

Read the full article