Core java interview questions and answers for all kind of people like freshers, experienced persons and all. Here we have given a PDF downloadable content for java related interviews. Between experienced Java developer can use this awesome guide for their recall/remembrance. But this Q&A content looks like simple for well experienced professionals.
Meanwhile this java interview questions guide will help a lot to Beginners ho are learning. Same time the Beginners will feel this is an advanced java guide and bitter tougher as well. But this java interview questions and answers is logically very simple to understand and simple to view and/or download!
State the best feature of Java, which makes it an important language.
The most important feature is that it is a Platform Independent Language.
Please explain the term “Platform Independent Language.”
Platform independent language means we can write and compile the coding part in Java on one platform, for example, Windows and are still able to execute its class on some other supported platform like Linux, etc.
Differentiate between a method and a constructor.
A method is a simple member function of the defined class. It is defined by a name and has a return type that can be void. The process of invoking a method is by using the dot operator. Whereas, a constructor is mainly a member function of the class and is used to generate the objects of the related class. The name of a constructor is same as of the class it is related to, and it does not have any return type. It is invoked by using the new operator.
What do you understand by the term JVM?
JVM stands for JAVA Virtual Machine. It can be explained as the run time environment for the Java class files that are compiled.
What do you understand by local variables and instance variables in JAVA?
Local variables are declared inside a block of code (for example inside a method) and should be initialized before the process of accessing them. Instance variables need to be defined at the class level, but prior initialization of this type of variables is not required.
What do you understand by Abstraction in JAVA and what is an Abstract Class?
Abstraction is defined as the process of hiding the details of how the implementation is being done by showing only the functionality part to the user. A class, when declared with the keyword ABSTRACT, is known as an abstract class in JAVA. It may contain static data and may not be instantiated.
Can you declare a class as static?
No, we cannot declare a class as static but a variable or method can be declared as static.
Please explain two types of Casting in JAVA.
The two types of Casting in JAVA are :
- Casting between Primitive Numeric Type: This type of casting is used to convert larger values like double to the smaller once like a byte.
- Casting between Object references: This type of casting is used to refer to an object by a compatible interface, array type or even a compatible class.
In what circumstances a method is required to be declared as static?
In case, a method is required to be accessed before the creation of the object of a class, and then it is needed to declare this method as static.
What are the different ways of using or implementing THREAD?
A Thread can be implemented by using or applying Runnable Interface or even by inheriting it from a class named THREAD.
What is Garbage Collection in JAVA?
Garbage collection means identifying the objects that are not anymore needed by a program and subsequently discarding them to reuse and reclaim the resources earlier used by these objects.
What do you understand by Numeric Promotion in JAVA?
It is basically the conversion of the small numeric type to a larger or bigger numeric type. It is required so that the floating type and integer type operations can take place without hassle. During Numeric Promotion, the byte, short and char type values get converted or promoted to Int type values. In the case of requirement the Int type values gets converted to long type values. The long and float values can be converted to double type values if required.
What do you understand by a Package in JAVA? Please explain its usage.
A Package in JAVA can be defined as the context of naming the interfaces and classes. It is basically used to generate the separate and distinguished namespace for the various groups of interfaces and classes. These Packages are also needed to manage the related interfaces and classes into a one API unit and also, to organize the accessibility to these interfaces and classes.
In a software developing/programming arena IT companies in India and abroad like TCS, Infosys, CTS, WIPRO, HCL, Accenture, IBM and more will have a technical rounds in their placement interviews. Some of the IT companies are looking forward to pick java professionals. So that they will have the specific requirements on core java programming skills.
Strong java programming skills are the token for “Java job market.” What will be the questions covered in this java interview guide?
- Core java Q&A’s,
- Basic java terms,
- Example java programming codes,
- Java technical interview questions,
- JDBC, Applets, AWT & Swings interview questions and answers,
- And even more than 150+ java questions with simple answers.
Related: C++ Interview Questions & Answers
Read: How to Answer 50+ Toughest “Job Interview Questions”
More Download java interview questions PDF:
This technical interview guide on java is freely available for all students, freshers and experienced persons. Final year students can make use of this guide for their placement interviews. If you like this then feel free to share with your friends also. All the very best!
Click here to download java interview Q&A’s