Monday, October 14, 2019

Java Interview Questions


Image result for java images
Q #1) What is JAVA?
Ans: Java is a high-level programming language and is platform independent.
Java 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.
Q #2) What are the features in JAVA?
Ans: Features of Java:
  • Oops 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 main thread. The user can create multiple threads by extending the thread class or by implementing Runnable interface.
Q #3) How does Java enable high performance?
Ans: Java uses Just In Time compiler to enable high performance. JIT is used to convert the instructions into bytecodes.
Q #4) What are the Java IDE’s?
Ans: Eclipse and NetBeans are the IDE's of JAVA.
Q #5) What do you mean by Constructor?
Ans: The points given below explain what a Constructor is in detail:
  • 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 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.

No comments:

Post a Comment

Which Python course is best for beginners?

Level Up Your Python Prowess: Newbie Ninjas: Don't fret, little grasshoppers! Courses like "Learn Python 3" on Codecade...