Hi, all aspiring Java professionals! If you are puzzled where to look for the latest Java interview questions, you have come to the right place.
seen from Australia
seen from Hong Kong SAR China
seen from United States
seen from Argentina

seen from Canada

seen from Lebanon
seen from Canada

seen from Brazil
seen from Japan

seen from United Kingdom

seen from Brazil
seen from China
seen from Canada
seen from United Kingdom
seen from United States
seen from Russia
seen from Australia
seen from United States
seen from France
seen from China
Hi, all aspiring Java professionals! If you are puzzled where to look for the latest Java interview questions, you have come to the right place.
What are Annotations? Annotations provide auxiliary information about the program. It can be attached...
**Introduction to Binary Search:-** Searching is one of the most rudimentary tasks that almost all of us perform on a daily basis, be it searching for p...
Here's a detailed guide on binary search in Java, a commonly asked Java Interview Question explained with examples and its implementation.
Java Mock Test, prepare yourself for Java interview, Java Quiz Series, Java Tutorial, Deeper knowlede of Java Technology,what is Java
Top Core Java interview questions with answers, crack Java Interview 2019, preparation for Java Developer's interview, learn Java with practice questions
Best Java Interview Questions with answers for 2019,crack Java Interview, questions are to be asked in upcoming Java Interview, preparation for Interview
Java Interview questions
6) Difference between abstract class and interface ?
Interface
Interface contains only abstract methods
Access Specifiers for methods in interface must be public
Variables defined must be public , static final
Multiple Inheritance in java is implemented using interface
To implement an interface we use implements keyword
Abstract Class
Abstract class can contain abstract methods, concrete methods or both
Except private we can have any access specifier for methods in abstract class.
Except private variables can have any access specifiers
We cannot achieve multiple inheritance using abstract class
To implement an interface we use implement keyword
7) Why java is platform independent?
The most unique feature of java is platform independent. In any programming language soruce code is compiled in to executable code . This cannot be run across all platforms. When javac compiles a java program it generates an executable file called .class file.
class file contains byte codes. Byte codes are interpreted only by JVM’s . Since these JVM’s are made available across all platforms by Sun Microsystems, we can execute this byte code in any platform. Byte code generated in windows environment can also be executed in linux environment. This makes java platform independent.
8) What is method overloading in java ?
A class having two or more methods with same name but with different arguments then we say that those methods are overloaded. Static polymorphism is achieved in java using method overloading. Method overloading is used when we want the methods to perform similar tasks but with different inputs or values. When an overloaded method is invoked java first checks the method name, and the number of arguments ,type of arguments; based on this compiler executes this method. Compiler decides which method to call at compile time. By using overloading static polymorphism or static
binding can be achieved in java.
Note : Return type is not part of method signature. we may have methods with different return types but return type alone is not sufficient to call a method in java.
9) What is difference between c++ and Java ?
Interface
Java is platform independent
There are no pointers in java
There is no operator overloading in java
There is garbage collection in java
Supports multithreading
There are no templates in java
There are no global variables in java
Abstract Class
C++ is platform dependent.
There are pointers in C++
C ++ has operator overloading.
There is no garbage collection
Does’nt support multithreading
There are templates in java
There are global variables in c++
10) What is bytecode in java ?
JIT compiler stands for Just in time compiler. JIT compiler compiles byte code in to executable code . JIT a part of JVM .JIT cannot convert complete java program in to executable code it converts as and when it is needed during execution.
11) What is bytecode in java ?
When a javac compiler compiler compiles a class it generates .class file. This .class file contains set of instructions called byte code. Byte code is a machine independent language and contains set of instructions which are to be executed only by JVM. JVM can understand this byte codes.
12) Difference between this() and super() in java ?
this() is used to access one constructor from another with in the same class while super() is used to access superclass constructor. Either this() or super() exists it must be the first statement in the constructor.
13) What is a class ?
Classes are fundamental or basic unit in Object Oriented Programming .A class is kind of blueprint or template for objects. Class defines variables, methods. A class tells what type of objects we are creating. For example take Department class tells us we can create department type objects. We can create any number of department objects.
All programming constructs in java reside in class. When JVM starts running it first looks for the class when we compile. Every Java application must have atleast one class and one main method. Class starts with class keyword. A class definition must be saved in class file that has same as class name. File name must end with .java extension.
public class FirstClass
{public static void main(String[] args)
{System.out.println(“My First class”);
}
}
If we see the above class when we compile JVM loads the FirstClass and generates a .class file(FirstClass.class). When we run the program we are running the class and then executes the main method.
14) What is an object ?
An Object is instance of class. A class defines type of object. Each object belongs to some class.Every object contains state and behavior. State is determined by value of attributes and behavior is called method. Objects are alos called as an instance.
To instantiate the class we declare with the class type.
public classFirstClass {public static voidmain(String[] args)
{
FirstClass f=new FirstClass();
System.out.println(“My First class”);
}
}
To instantiate the FirstClass we use this statement
FirstClass f=new FirstClass();
f is used to refer FirstClass object
Learn 7 Basics of Java Programming to Start Coding Today
Learn 7 Basics of Java Programming to Start Coding Today
In this post, I will cover 7 basics of Java Programming to help you start coding in Java Today. Before going ahead, I would recommend you go through our blog on How to Learn Java from Scratch, which ensures you have a clear learning roadmap in your mind.
I probably don’t need to tell you that without mastering basics in Java or any programming language, you cannot do coding efficiently.
Whether…
View On WordPress