Skip to content

ProgrammingCodeTech/CoreJavaInterviewQuestion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 

Repository files navigation

CoreJavaInterviewQuestion

Core Java Interview Question

Q1 What is JAVA?

 Java is a high-level programming language and is platform-independent.It is a collection of objects. It was developed by Sun Microsystems. There are a lot of applications,        websites, and games that are developed using Java.

Q2 What are the features of JAVA?

Features of Java are as follows:

OOP concepts

  • Object-oriented
  • Inheritance
  • Encapsulation
  • Polymorphism
  • Abstraction
  • Platform independent:** A single program works on different platforms without any modification.
  • High Performance:** JIT (Just In Time compiler) enables high performance in Java. JIT converts the bytecode into machine language and then JVM starts the execution.
  • Multi-threaded:** A flow of execution is known as a Thread. JVM creates a thread which is called the main thread. The user can create multiple threads by extending the thread
    class or by implementing the Runnable interface.

Q3 How does Java enable high performance?

     Java uses Just In Time compiler to enable high performance. It is used to convert the instructions into bytecodes.

Q4 What do you mean by Constructor?

Constructor can be explained in detail with enlisted points:

  • When a new object is created in a program a constructor gets invoked corresponding to the class.
  • The constructor is a method which has the same name as the class name.
  • If a user doesn’t create a constructor implicitly a default constructor will be created.
  • The constructor can be overloaded.
  • If the user created a constructor with a parameter then he should create another constructor explicitly without a parameter.

Q5 What is meant by the Local variable and the Instance variable?

  • Local variables* are defined in the method and scope of the variables that exist inside the method itself.
  • Instance variable* is defined inside the class and outside the method and the scope of the variables exists throughout the class.

About

Core Java Interview Question

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •