Java Basic Interview Questions And Answers

25 Java Basic Interview Questions And Answers – Core Java Interview Questions For Experienced 2018 from Codingcompiler. Test your Java knowledge by answering these tricky interview questions on Java. Let’s start learning core Java interview questions and prepare for Java interviews. All the best for your future and happy learning.

Continue reading “Java Basic Interview Questions And Answers”

Core Java Multiple Choice Questions With Answers 2018

Core Java Multiple Choice Questions With Answers 2018. Here Coding compiler sharing a list of 40 Java Objective Questions and Answers for freshers and experienced Java developers. We hope that these Java MCQ Questions will help you to crack your next Java interview. All the best for your future and happy Java learning.

Core Java Multiple Choice Questions

1) A process that involves recognizing and focusing on the important characteristics of a situation or object is known as:

(a) Encapsulation (b) Polymorphism
(c) Abstraction (d) Inheritance
(e) Object persistence.

A) c

2) Which statement is true regarding an object?

(a) An object is what classes instantiated are from
(b) An object is an instance of a class
(c) An object is a variable
(d) An object is a reference to an attribute
(e) An object is not an instance of a class.

A) b

3) In object-oriented programming, composition relates to

(a) The use of consistent coding conventions
(b) The organization of components interacting to achieve a coherent, common behavior
(c) The use of inheritance to achieve polymorphic behavior
(d) The organization of components interacting not to achieve a coherent common behavior
(e) The use of data hiding to achieve polymorphic behavior.

A) b

4) In object-oriented programming, new classes can be defined by extending existing classes. This is an example of:

(a) Encapsulation (b) Interface
(c) Composition (d) Inheritance (e) Aggregation.

A) d

5) Which of the following does not belong: If a class inherits from some other class, it should

(a) Make use of the parent class’s capabilities
(b) Over-ride or add the minimum to accomplish the derived class’ purpose
(c) Over-ride all the methods of its parent class
(d) Make sure the result “IS-A-KIND-OF” its base class
(e) Make sure the result “contains” its base class.

A) c

6) Object-oriented inheritance models the

(a) “is a kind of” relationship
(b) “has a” relationship
(c) “want to be” relationship
(d) inheritance does not describe any kind of relationship between classes
(e) “contains” of relationship.

A) a

7) The wrapping up of data and functions into a single unit is called

(a) Encapsulation (b) Abstraction
(c) Data Hiding (d) Polymorphism (e) Message passing.

A) a

8) Polymorphism

(a) Is not supported by Java
(b) Refers to the ability of two or more objects belonging to different classes to respond to exactly the same message in different class-specific ways
(c) Simplifies code maintenance
(d) Not simplifies code maintenance
(e) Refers to the ability of two or more objects belonging to different classes to respond to exactly the same message in different class-specific ways and simplifies code maintenance.

A) e

9) In object-oriented programming, new classes can be defined by extending existing classes. This is an example of:

(a) Encapsulation (b) Interface (c) Composition
(d) Inheritance (e) Aggregation.

A) d

10) Given a class named student, which of the following is a valid constructor declaration for the class?

(a) Student (student s) { } (b) Student student ( ) { }
(c) Private final student ( ) { } (d) Void student ( ) { }
(e) Static void student(){ }.

A) a

Core Java Multiple Choice Questions With Answers

11) What is garbage collection in the context of Java?

(a) The operating system periodically deletes all of the java files available on the system.
(b) Any package imported in a program and not used is automatically deleted.
(c) When all references to an object are gone, the memory used by the object is automatically reclaimed.
(d) The JVM checks the output of any Java program and deletes anything that doesn’t make sense.
(e) When all references to an object are gone the memory used by the object is not reclaimed.

A) c

12) The concept of multiple inheritances is implemented in Java by

I. Extending two or more classes.
II. Extending one class and implementing one or more interfaces.
III. Implementing two or more interfaces.

(a) Only (II) (b) (I) and (II) (c) (II) and (III)
(d) Only (I) (e) Only (III).

A) c

13) In Java, declaring a class abstract is useful

(a) To prevent developers from further extending the class
(b) When it doesn’t make sense to have objects of that class
(c) When default implementations of some methods are not desirable
(d) To force developers to extend the class not to use its capabilities
(e) When it makes sense to have objects of that class.

A) b

14) What is the error in the following class definitions?

Abstract class xy
{
abstract sum (int x, int y) { }
}

(a) Class header is not defined properly.
(b) Constructor is not defined.
(c) Method is not defined properly
(d) Method is defined properly
(e) No error.

A) c

15) Which of these field declarations are legal within the body of an interface?

(a) Private final static int answer = 42 (b) public static int answer=42
(c) final static answer =42 (d) int answer
(e) No error.

A) b

16) A package is a collection of

(a) Classes (b) Interfaces (c) Editing tools
(d) Classes and interfaces (e) Editing tools and interfaces.

A) d

17) A method within a class is only accessible by classes that are defined within the same package as the class of the method. Which one of the following is used to enforce such restriction?

(a) Declare the method with the keyword public
(b) Declare the method with the keyword private
(c) Declare the method with the keyword protected
(d) Do not declare the method with any accessibility modifiers
(e) Declare the method with the keyword public and private.

A) d

18) Basic Java language functions are stored in which of the following java package?

(a) java.lang (b) java.io (c) java.net (d) java.util (e) java.awt

A) a

19) Which of the following is a member of the java.lang package?

(a) List (b) Queue (c) Math (d) Stack (e) Process.

A) b

20) Which of the following has a method names flush( )?

(a) Input stream (b) Output Stream
(c) Reader stream (d) Input reader stream
(e) Input output stream.

A) b

Core Java Multiple Choice Questions And Answers

Core Java Multiple Choice Questions # 21) What is the fundamental unit of information of writer streams?

(a) Characters (b) Bytes
(c) Files (d) Records (e) Information.

A) a

Core Java Multiple Choice Questions # 22) File class is included in which package?

(a) java.io package (b) java.lang package
(c) java.awt package (d) java.net.package
(e) java.util.package.

A) a

Core Java Multiple Choice Questions # 23) Given the code

String s1 = ” yes” ;
String s2 = ” yes ” ;
String s3 = new String ( s1);

Which of the following would equate to true?

(a) s1 == s2 (b) s1 = s2 (c) s3 == s1 (d) s3=s1 (e) s1!=s2.

A) a

Core Java Multiple Choice Questions # 24) URL stands for

(a) Universal reader locator (b) Universal reform loader
(c) Uniform resource loader (d) Uniform resource locator
(e) Uniform reader locator.

A) d

Core Java Multiple Choice Questions # 25) What is the sequence of major events in the life of an applet?

(a) init, start, stop, destroy (b) start, init , stop , destroy
(c) init, start , destroy, stop (d) init, start, destroy
(e) destroy, start, init, stop.

A) a

Core Java Multiple Choice Questions # 26) Which of the following is true in regard to applet execution?

(a) Applets loaded from the same computer where they are executing have the same restrictions as applets loaded from the network.
(b) Applets loaded and executing locally have none of the restrictions faced by applets that get loaded from the network.
(c) Applets loaded and executing locally have some restrictions faced by applets that get loaded from the network.
(d) Applets cant react to user input and change dynamically
(e) Applets can be run independently.

A) b

Core Java Multiple Choice Questions # 27) What is the return type of the method getID() defined in AWTEvent class

(a) Int (b) long (c) Object (d) Component (e) float.

A) a

Core Java Multiple Choice Questions # 28) Which of the following events will cause a thread to die?

(a) The method sleep( ) is called
(b) The method wait( ) is called
(c) Execution of the start( ) method ends
(d) Execution of the run( ) method ends
(e) Execution of the run() method is called.

A) d

Core Java Multiple Choice Questions # 29) What will be the result of the expression 13 & 25?

(a) 38 (b) 25 (c) 9 (d) 12 (e) 21.

A) c

Core Java Multiple Choice Questions # 30) Which of the following statements are true regarding the finalize( ) method?

(a) The finalize ( ) method must be declared with protected accessibility
(b) The compiler will fail to compile the code that explicitly tries to call the finalize( ) method
(c) The body of the finalize ( ) method can only access other objects that are eligible for garbage collection
(d) The finalize ( ) method can be overloaded
(e) The finalize() method cant be overloaded.

A) d

Core Java Objective Questions And Answers

Core Java Multiple Choice Questions # 31) Which one of these is a valid method declaration?

(a)
void method1
(b)
void method2()
(c)
void method3(void)
(d)
method4()
(e)
methods(void).

A) b

Core Java Multiple Choice Questions # 32) Given a class named Book, which one of these is a valid constructor declaration for the class?

(a)
Book(Book b) { }
(b)
Book Book() { }
(c)
private final Book() { }
(d)
void Book() { }
(e)
abstract Book() { }.

A) a

Core Java Multiple Choice Questions # 33) What will be the result of attempting to compile the following program?

public class MyClass {
long var;
public void MyClass(long param) { var = param; } //(1)
public static void main(String[] args) {
MyClass a,b;
a = new MyClass(); //(2)
b = new MyClass(5); //(3)
}
}

(a)
A compilation ERROR will occur at (1), since constructors cannot specify a return value
(b)
A compilation error will occur at (2), since the class does not have a default constructor
(c)
A compilation error will occur at (3), since the class does not have a constructor which takes one argument of type int
(d)
The program will compile correctly
(e)
The program will compile and execute correctly.

A) c

Core Java Multiple Choice Questions # 34) Given the following class, which of these is valid way of referring to the class from outside of the package net.basemaster?

package net.basemaster;
public class Base {
// . . .
}
Select the correct answer.

(a)
By simply referring to the class as Base
(b)
By simply referring to the class as basemaster.Base
(c)
By simply referring to the class as net.basemaster.Base
(d)
By simply referring to the class as net.Base
(e)
By importing with net.* and referring to the class as basemaster.Base.

A) c

Core Java Multiple Choice Questions # 35) Which one of the following class definitions is a valid definition of a class that cannot be instantiated?

(a)
class Ghost
{
abstract void haunt();
}

(b)
abstract class Ghost
{
void haunt();
}

(c)
abstract class Ghost
{
void haunt() { };
}

(d)
abstract Ghost
{
abstract void haunt();
}

(e)
static class Ghost
{
abstract haunt();
}

A) c

Core Java MCQ Questions With Answers

36) Which one of the following class definitions is a valid definition of a class that cannot be extended?

(a)
class Link { }
(b)
abstract class Link { }
(c)
native class Link { }
(d)
static class Link { }
(e)
final class Link { }.

A) e

37) Given the following definition of a class, which fields are accessible from outside the package com.corporation.project?

package com.corporation.project;
public class MyClass
{
int i;
public int j;
protected int k;
private int l;
}
Select the correct answer.

(a)
Field i is accessible in all classes in other packages
(b)
Field j is accessible in all classes in other packages
(c)
Field k is accessible in all classes in other packages
(d)
Field l is accessible in all classes in other packages
(e)
Field l is accessible in subclasses only in other packages.

A) b

38) How restrictive is the default accessibility compared to public, protected, and private accessibility?

(a)
Less restrictive than public
(b)
More restrictive than public, but less restrictive than protected
(c)
More restrictive than protected, but less restrictive than private
(d)
More restrictive than private
(e)
Less restrictive than protected from within a package, and more restrictive than protected from outside a package.

A) c

39) Which statement is true about accessibility of members?

(a)
Private members are always accessible from within the same package
(b)
Private members can only be accessed by code from within the class of the member
(c)
A member with default accessibility can be accessed by any subclass of the class in which it is defined
(d)
Private members cannot be accessed at all
(e)
Package/default accessibility for a member can be declared using the keyword default.

A) b

40) Which of the following is true about the use of modifiers?

(a)
If no accessibility modifier (public, protected, and private) is specified for a member declaration, the member is only accessible for classes in the package of its class and subclasses of its class anywhere
(b)
You cannot specify accessibility of local variables. They are only accessible within the block in which they are declared
(c)
Subclasses of a class must reside in the same package as the class they extend
(d)
Local variables can be declared static
(e)
None of the above.

A) b

Must Read Java Interview Questions Books

Related Java Interview Questions

  1. 60 Java Multiple Choice Questions
  2. Aricent Java Interview Questions
  3. Accenture Java Interview Questions
  4. Advanced Java Interview Questions For 5 8 10 Years Experienced
  5. Core Java Interview Questions For Experienced

OTHER INTERVIEW QUESTIONS

  1. Anaplan Interview Questions And Answers
  2. Tableau Multiple Choice Questions
  3. Python Coding Interview Questions
  4. CSS3 Interview Questions
  5. Linux Administrator Interview Questions
  6. SQL Interview Questions
  7. Hibernate Interview Questions
  8. Kubernetes Interview Questions
  9. Kibana Interview Questions
  10. Nagios Interview Questions
  11. Jenkins Interview Questions
  12. Chef Interview Questions
  13. Puppet Interview Questions
  14. RPA Interview Questions And Answers
  15. Android Interview Questions
  16. Mulesoft Interview Questions
  17. JSON Interview Questions
  18. PeopleSoft HRMS Interview Questions
  19. PeopleSoft Functional Interview Questions
  20. PeopleTools Interview Questions
  21. Peoplesoft Technical Interview Questions
  22. 199 Peoplesoft Interview Questions
  23. 200 Blue Prism Interview Questions
  24. Visualforce Interview Questions
  25. Salesforce Interview Questions
  26. 300 SSIS Interview Questions
  27. PHP Interview Questions And Answers
  28. Alteryx Interview Questions
  29. AWS Cloud Support Interview Questions
  30. Google Kubernetes Engine Interview Questions
  31. AWS Devops Interview Questions

399 Core Java Interview Questions For Experienced

Core Java Interview Questions. Coding compilers collected list of 399 core java interview questions for freshers to experienced developers. This list of interview questions includes, java interview questions for 3 years experience, core java interview questions for senior developers, java interview questions for 2 years experience, java interview questions for 5 years experience. We are sure that after going through these java interview questions, you will be in a position to handle any java job interview. Happy learning.!

Core Java Interview Questions

What Do You Mean By Platform Independence?

Are Jvm’s Platform Independent?
What Is A Jvm?
What Is The Difference Between A Jdk And A Jvm?
What Is A Pointer And Does Java Support Pointers?
What Is The Base Class Of All Classes?
Does Java Support Multiple Inheritance?
Is Java A Pure Object Oriented Language?
Are Arrays Primitive Data Types?
What Is Difference Between Path And Classpath?
What Are Local Variables?
What Are Instance Variables?
How To Define A Constant Variable In Java?
Should A Main Method Be Compulsorily Declared In All Java Classes?
What Is The Return Type Of The Main Method?
Why Is The Main Method Declared Static?
What Is The Arguement Of Main Method?
Can A Main Method Be Overloaded?
Can A Main Method Be Declared Final?
Does The Order Of Public And Static Declaration Matter In Main Method?
Can A Source File Contain More Than One Class Declaration?
What Is A Package?
Which Package Is Imported By Default?
Can A Class Declared As Private Be Accessed Outside It’s Package?
Can A Class Be Declared As Protected?
What Is The Access Scope Of A Protected Method?
What Is The Purpose Of Declaring A Variable As Final?
What Is The Impact Of Declaring A Method As Final?
I Don’t Want My Class To Be Inherited By Any Other Class. What Should I Do?
Can You Give Few Examples Of Final Classes Defined In Java Api?
How Is Final Different From Finally And Finalize?
Can A Class Be Declared As Static?
When Will You Define A Method As Static?
What Are The Restriction Imposed On A Static Method Or A Static Block Of Code?
I Want To Print “hello” Even Before Main Is Executed. How Will You Acheive That?
What Is The Importance Of Static Variable?
Can We Declare A Static Variable Inside A Method?
What Is An Abstract Class And What Is It’s Purpose?
Can A Abstract Class Be Declared Final?
What Is Use Of A Abstract Variable?
Can You Create An Object Of An Abstract Class?
Can A Abstract Class Be Defined Without Any Abstract Methods?
Class C Implements Interface I Containing Method M1 And M2 Declarations. Class C Has Provided Implementation For Method M2. Can I Create An Object Of Class C?

Java Interview Questions for 2 Years Experience

Can A Method Inside A Interface Be Declared As Final?
Can An Interface Implement Another Interface?
Can An Interface Extend Another Interface?
Can A Class Extend More Than One Class?
Why Is An Interface Be Able To Extend More Than One Interface But A Class Can’t Extend More Than One Class?
Can An Interface Be Final?
Can A Class Be Defined Inside An Interface?
Can An Interface Be Defined Inside A Class?
What Is A Marker Interface?
Which Oo Concept Is Achieved By Using Overloading And Overriding?
If I Only Change The Return Type, Does The Method Become Overloaded?
Why Does Java Not Support Operator Overloading?
Can We Define Private And Protected Modifiers For Variables In Interfaces?
What Is Externalizable?
What Modifiers Are Allowed For Methods In An Interface?
What Is A Local, Member And A Class Variable?
What Is An Abstract Method?
What Value Does Read() Return When It Has Reached The End Of A File?
Can A Byte Object Be Cast To A Double Value?
What Is The Difference Between A Static And A Non-static Inner Class?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
What Is An Object’s Lock And Which Object’s Have Locks?
What Is The % Operator?
When Can An Object Reference Be Cast To An Interface Reference?
Which Class Is Extended By All Other Classes?
Which Non-unicode Letter Characters May Be Used As The First Character Of An Identifier?
What Restrictions Are Placed On Method Overloading?
What Is Transient Variable?
What Is Collection Api?
What Is Casting?
What Is The Return Type Of A Program’s Main() Method?
If A Variable Is Declared As Private, Where May The Variable Be Accessed?
What Do You Understand By Private, Protected And Public?
What Is Downcasting ?
What Modifiers May Be Used With An Inner Class That Is A Member Of An Outer Class?
How Many Bits Are Used To Represent Unicode, Ascii, Utf-16, And Utf-8 Characters?
What Restrictions Are Placed On The Location Of A Package Statement Within A Source Code File?
What Is A Native Method?
What Are Order Of Precedence And Associativity, And How Are They Used?
Can An Anonymous Class Be Declared As Implementing An Interface And Extending A Class?
What Is The Range Of The Char Type?
What Is The Range Of The Short Type?
Why Isn’t There Operator Overloading?
What Does It Mean That A Method Or Field Is “static”?
Is Null A Keyword?
Which Characters May Be Used As The Second Character Of An Identifier,but Not As The First Character Of An Identifier?
Is The Ternary Operator Written X : Y ? Z Or X ? Y : Z ?
How Is Rounding Performed Under Integer Division?
If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?
Does A Class Inherit The Constructors Of Its Superclass?
Name The Eight Primitive Java Types.
What Restrictions Are Placed On The Values Of Each Case Of A Switch Statement?
What Is The Difference Between A While Statement And A Do Statement?
What Modifiers Can Be Used With A Local Inner Class?
When Does The Compiler Supply A Default Constructor For A Class?
If A Method Is Declared As Protected, Where May The Method Be Accessed?
What Are The Legal Operands Of The Instanceof Operator?
Are True And False Keywords?
What Happens When You Add A Double Value To A String?
What Is The Diffrence Between Inner Class And Nested Class?
Can An Abstract Class Be Final?
What Is Numeric Promotion?
What Is The Difference Between A Public And A Non-public Class?
To What Value Is A Variable Of The Boolean Type Automatically Initialized?
What Is The Difference Between The Prefix And Postfix Forms Of The ++ Operator?
What Restrictions Are Placed On Method Overriding?
What Is A Java Package And How Is It Used?
What Modifiers May Be Used With A Top-level Class?
What Is The Difference Between An If Statement And A Switch Statement?
Can A Method Be Overloaded Based On Different Return Type But Same Argument Type ?
What Happens To A Static Var That Is Defined Within A Method Of A Class ?
How Many Static Init Can You Have ?
What Is The Difference Between Method Overriding And Overloading?
What Is Constructor Chaining And How Is It Achieved In Java ?
What Is The Difference Between The Boolean & Operator And The && Operator?
Which Java Operator Is Right Associative?
Can A Double Value Be Cast To A Byte?

Java Interview Questions for 3 Years Experience

 What Is The Difference Between A Break Statement And A Continue Statement?
Can A For Statement Loop Indefinitely?
To What Value Is A Variable Of The String Type Automatically Initialized?
What Is The Difference Between A Field Variable And A Local Variable?
How Are This() And Super() Used With Constructors?
What Does It Mean That A Class Or Member Is Final?
What Does It Mean That A Method Or Class Is Abstract?
Can An Anonymous Class Be Declared As Implementing An Interface And Extending A Class?
What Is The Catch Or Declare Rule For Method Declarations?
What Are Some Alternatives To Inheritance?
What Are The Different Identifier States Of A Thread?
What Is Garbage Collection? What Is The Process That Is Responsible For Doing That In Java?
What Kind Of Thread Is The Garbage Collector Thread?
What Is A Daemon Thread?
How Will You Invoke Any External Process In Java?
What Is The Finalize Method Do?
What Is Mutable Object And Immutable Object?
What Is The Basic Difference Between String And Stringbuffer Object?
What Is The Purpose Of Void Class?
What Is Reflection?
What Is The Base Class For Error And Exception?
What Is The Byte Range?
What Is The Implementation Of Destroy Method In Java.. Is It Native Or Java Code?
What Are The Approaches That You Will Follow For Making A Program Very Efficient?
What Is A Databasemetadata?
What Is Locale?
How Will You Load A Specific Locale?
What Is Jit And Its Use?
Is Jvm A Compiler Or An Interpreter?
What Is The Purpose Of Assert Keyword Used In Jdk1.4.x?
How Will You Get The Platform Dependent Values Like Line Separator, Path Separator, Etc., ?
Is “abc” A Primitive Value?
What Is Singleton?
Can You Instantiate The Math Class?
What Are The Methods In Object?
What Is Aggregation?
What Is Composition?
What Is Inner Class?
What Is Nested Class?
What Is The Major Difference Between Linkedlist And Arraylist?
What Is The Significance Of Listiterator?
What Is The Final Keyword Denotes?
What Is Skeleton And Stub? What Is The Purpose Of Those?
Why Does It Take So Much Time To Access An Applet Having Swing Components The First Time?
What Is The Difference Between Instanceof And Isinstance?
What Does The “final” Keyword Mean In Front Of A Variable? A Method? A Class?
Describe What Happens When An Object Is Created In Java?
What Is The Difference Amongst Jvm Spec, Jvm Implementation, Jvm Runtime ?
How Does Java Handle Integer Overflows And Underflows?
Why Are There No Global Variables In Java?
Whats The Difference Between Notify() And Notifyall()?
How Can My Application Get To Know When A Httpsession Is Removed?
What Interface Must An Object Implement Before It Can Be Written To A Stream As An Object?
What Is Your Platform’s Default Character Encoding?
What An I/o Filter?
What Is The Purpose Of Finalization?
Which Class Should You Use To Obtain Design Information About An Object?
What Is The Purpose Of The System Class?
Can We Use The Constructor, Instead Of Init(), To Initialize Servlet?
How Can A Servlet Refresh Automatically If Some New Data Has Entered The Database?

Java Interview Questions for 4 Years Experience

 The Code In A Finally Clause Will Never Fail To Execute, Right?
How Many Messaging Models Do Jms Provide For And What Are They?
What Information Is Needed To Create A Tcp Socket?
What Class.forname Will Do While Loading Drivers?
How Many Jsp Scripting Elements Are There And What Are They?
What Are Stored Procedures? How Is It Useful?
How Do I Include Static Files Within A Jsp Page?
Why Does Jcomponent Have Add() And Remove() Methods But Component Does Not?
How Can I Implement A Thread-safe Jsp Page?
What Is The Difference Between Procedural And Object-oriented Programs?
What Are Encapsulation, Inheritance And Polymorphism?
What Is The Difference Between Assignment And Initialization?
What Is Oops?
What Are Class, Constructor And Primitive Data Types?
What Is An Object And How Do You Allocate Memory To It?
What Is The Difference Between Constructor And Method?
What Are Methods And How Are They Defined?
What Is The Use Of Bin And Lib In Jdk?
How Many Ways Can An Argument Be Passed To A Subroutine And Explain Them?
What Is The Difference Between An Argument And A Parameter?
How Would You Implement A Thread Pool?
What Are The Advantages And Disadvantages Of Reference Counting In Garbage Collection?
Why Java Is Said To Be Pass-by-value ?
What Are The Access Modifiers Available In Java?
What Is The Difference Between A Switch Statement And An If Statement?
What Are Synchronized Methods And Synchronized Statements?
What Are The Different Ways In Which A Thread Can Enter Into Waiting State?
What Is The Difference Between Static And Non Static Variables ?
What Is The Difference Between Notify And Notifyall Method?
What Are Different Type Of Exceptions In Java?
Explain About The Select Method With An Example?
Can There Be An Abstract Class With No Abstract Methods In It?
Can We Define Private And Protected Modifiers For Variables In Interfaces?
What Is Garbage Collection? What Is The Process That Is Responsible For Doing That In Java?
Can There Be An Abstract Class With No Abstract Methods In It?
Can An Interface Have An Inner Class?
What Is User Defined Exception?
What Is The Difference Between Logical Data Independence And Physical Data Independence?
What Are The Practical Benefits, If Any, Of Importing A Specific Class Rather Than An Entire Package (e.g. Import Java.net.* Versus Import Java.net.socket)?
How Many Methods Do U Implement If Implement The Serializable Interface?
What Does The “abstract” Keyword Mean In Front Of A Method? A Class?
You Can Create A String Object As String Str = “abc”; Why Cant A Button Object Be Created As Button Bt = “abc”;? Explain
Can Rmi And Corba Based Applications Interact ?
What Is Passed By Reference And Pass By Value ?
What Is A “stateless” Protocol ?
Difference Between A Class And An Object ?
What Are The Four Corner Stones Of Oop?
What Gives Java It’s “write Once And Run Anywhere” Nature?
How Can A Dead Thread Be Restarted?
What Happens If An Exception Is Not Caught?
What Is A Compilation Unit?
What Is A Task’s Priority And How Is It Used In Scheduling?
What Value Does Readline() Return When It Has Reached The End Of A File?
Can An Object’s Finalize() Method Be Invoked While It Is Reachable?
Does Garbage Collection Guarantee That A Program Will Not Run Out Of Memory?
Is Sizeof A Keyword?
What State Does A Thread Enter When It Terminates Its Processing?
Can A Lock Be Acquired On A Class?
How Are Observer And Observable Used?
What Is A Transient Variable?
Wha Is The Output From System.out.println(“hello”+null); ?
What Are E And Pi?
If An Object Is Garbage Collected, Can It Become Reachable Again?
Can An Exception Be Rethrown?
What Is The Purpose Of The File Class?
Is A Class Subclass Of Itself?
What Modifiers May Be Used With An Interface Declaration?
What Classes Of Exceptions May Be Caught By A Catch Clause?
What Is The Difference Between The Reader/writer Class Hierarchy And The Inputstream/outputstream Class Hierarchy?
Can An Object Be Garbage Collected While It Is Still Reachable?
What Is An Object’s Lock And Which Object’s Have Locks?
How Are Commas Used In The Intialization And Iteration Parts Of A For Statement?
What Must A Class Do To Implement An Interface?
What Is The Difference Between Preemptive Scheduling And Time Slicing?
What Restrictions Are Placed On The Location Of A Package Statement Within A Source Code File?
What Are Wrapped Classes?
Is It Possible To Specify Multiple Jndi Names When Deploying An Ejb?
What Is Java And Their Uses?
What Is Hotjava?
How Can You Say Java Is Object Oriented?
Why Java Is Platform Independent? Explain.
Why Java Is Secure? Explain.
Why Do People Says “java Is Robust”?
How Java Is Similar To C?
What’s The Difference Between Applets And Standalone Program?
Why Java Applets Are More Useful For Intranets As Compared To Internet?
How Can You Set The Applet Size?
How Can You Set An Applet’s Height And Width As A Percentage?
What Is Codebase?
What Is Appletviewer?
Explain, Java Is Compatible With All Servers But Not All Browsers?
What Is The Program Development Process?
What Is The File Type?
What Is Javac_g?
How To Optimize The Javac Output?
What Is The Difference Between Java Applets And Applications?
Can You Explain The Cs Option Of Java Interpreter?
What Is The Statements?
What Is Style And Indentation?
What Is The Program Compilation Process?
What Is Java Literals?
What Is The Primitive Type Byte?
What Is The Primitive Type Short?
Why Call By Value Prevents Parameter Value Change?
What Is Remote Method Invocation (rmi)?
What Is Java Jit Compilers?
What Is The Java Idl System?
What Is Java Beans?
What Is Object-oriented Programming?
What Is Abstraction?
What Is Encapsulation?
How Does The Application Server Handle The Jms Connection?
What Is A Superclass?
Explain The Abstract Class Modifier?
What Is The Final Class Modifier?
Explain The Public Class Modifier.
What Is The Public Field Modifier?
Explain The Private Field Modifier?
Explain The Protected Field Modifier?
Can You Explain The Private Protected Field Modifier?
What Is The Static Field Modifier?
What Is The Final Field Modifier?
Explain The Transient Field Modifier?
Explain The Use Of Volatile Field Modifier?
What Is Default Constructors?
What Is The Public Method Modifier?
What Is The Private Method Modifier?
What Is The Protected Method Modifier?
Explain The Private Protected Method Modifier?
Can You Explain The Final Method Modifier?
What Is The Abstract Method Modifier?
What Is The Synchronized Method Modifier?
Explain The Init Method?
What Is The Destroy Method?
What Is Multithreading?

Java Interview Questions for 5 Years Experience

 How Java Uses The String And Stringbuffer Classes?
What Is The Epoch Date?
What Is An Arrays?
What Is Binary Search?
Can A Private Method Of A Superclass Be Declared Within A Subclass?
What Is Quick Sort?
What Is The Difference Between Final, Finally And Finalize?
In System.out.println( ), What Is System, Out And Println?
What Is Meant By “abstract Interface”?
What Is The Difference Between Swing And Awt Components?
Why Java Does Not Support Pointers?
What Are Parsers? Dom Vs Sax Parser.
What Is A Platform?
What Is The Main Difference Between Java Platform And Other Platforms?
What Is The Java Virtual Machine?
What Is The Java Api?
What Is The Package?
What Is Native Code?
Is Java Code Slower Than Native Code?
What Is The Serialization?
How To Make A Class Or A Bean Serializable?
How Many Methods Are There In The Serializable Interface?
How Many Methods Are There In The Externalizable Interface?
Which Containers Use A Border Layout As Their Default Layout?
What Is Synchronization And Why Is It Important?
What Are Three Ways In Which A Thread Can Enter The Waiting State?
What Is The Preferred Size Of A Component?
Can Java Object Be Locked Down For Exclusive Use By A Given Thread?
Can Each Java Object Keep Track Of All The Threads That Want To Exclusively Access It?
What Is The Purpose Of The Wait(), Notify() And Notifyall() Methods?
What Are The High-level Thread States?
What Is The Collections Api?
What Is The List Interface?
How Many Bits Are Used To Represent Unicode, Ascii, Utf-16 And Utf-8 Characters?
What Is The Properties Class?
What Is The Purpose Of The Runtime Class?
What Is The Purpose Of The Finally Clause Of A Try-catch-finally Statement?
What Is The Locale Class?
What Is A Protected Method?
What Is A Static Method?
What Is The Difference Between A Window And A Frame?
What Are Peerless Components?
What Is The Difference Between The Reader/writer Class Hierarchy And The Inputstream/outputstream Class Hierarchy?
What Is The Difference Between Throw And Throws Keywords?
Name Primitive Java Types?
How Can A Gui Component Handle Its Own Events?
What Advantage Do Java’s Layout Managers Provide Over Traditional Windowing Systems?
What Are The Problems Faced By Java Programmers Who Don’t Use Layout Managers?
What Is The Difference Between Static And Non-static Variables?
What Is The Difference Between The Paint() And Repaint() Methods?
What Is A Container In A Gui?
Is Iterator A Class Or Interface? What Is Its Use?
How You Can Force The Garbage Collection?
Describe The Principles Of Oops?
Explain The Encapsulation Principle?
Explain The Inheritance Principle?
How To Define An Abstract Class?
How To Define An Interface?
Explain The Polymorphism Principle?
Explain The Different Forms Of Polymorphism?
What Are Access Specifiers Available In Java?
What Do You Understand By A Variable?
What Do You Understand By Numeric Promotion?
Differentiate Between A Class And An Object.
What Is The Use Of Object And Class Classes?
What Do You Understand By Casting In Java Language?
What Are The Types Of Casting?
What Do You Understand By Downcasting?
What Do You Understand By Final Value?
What Are Keyboard Events?
What Is The Intersection And Union Methods?
What Are Controls And Their Different Types In Awt?
What Is The Difference Between Choice And List?
What Is The Difference Between Scrollbar And Scrollpane?
Which Containers Use A Flow Layout As Their Default Layout?
What Are Wrapper Classes?
What Is The Difference Between Set And List?
How Can The Checkbox Class Be Used To Create A Radio Button?
Which Textcomponent Method Is Used To Set A Textcomponent To The Read-only State?
What Methods Are Used To Get And Set The Text Label Displayed By A Button Object?
What Is The Difference Between Yield() And Sleep()?
How To Handle A Web Browser Resize Operation?
Explain The Concept Of Hashtables?

Must Read Java Interview Questions Books

RELATED INTERVIEW QUESTIONS

  1. Accenture Java Interview Questions
  2. Advanced Java Interview Questions
  3. Core Java Interview Questions
  4. .NET Interview Questions
  5. Ansible Interview Questions
  6. ServiceNow Interview Questions
  7. RPA Interview Questions
  8. Blue Prism Interview Questions
  9. SSIS Interview Questions And Answers
  10. Oracle Performance Tuning Interview Questions
  11. SCCM Interview Questions
  12. ServiceNow Interview Questions
  13. SQL Interview Questions
  14. Docker Interview Questions