Basic Java Interview Question and Answers

1. What is Java?
 
  • Java is an object programming language that was designed to be portable across multiple platforms and operating systems.
  • Developed by Sun Microsystems, Java is modeled after the C++ programming language and includes special features that make it ideal for programs on the Internet.
 
Your Name Your Email-ID
Your Answer
2. What is Hot Java?
 
  • Hot Java was the first Web browser that could download and play (execute) Java applets.
  • Hot Java, created by Sun, is simply a browser, much like the Netscape Navigator or Microsoft's Internet Exploere.
  • Although Hot Java was the first browser to support Java applets, many browsers now support or will soon support applets.
  • Starting with Netscape Navigator 2.0 for example, you can play Java applets for many platforms (Windows 95, the Mac and so on.).
  • Another distinguishing feature of Hot Java is that unlike most browsers which are written in C/C++.
  • Hot Java browser is written with the Java programming language.
 
Your Name Your Email-ID
Your Answer
3. What is static in Java?
 
  • Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class.
  • Static methods are implicitly final, because overriding is done based on the type of the object and static methods are attached to a class, not an object.
  • A static method in a superclass can be shadowed by another static method in a sub class, as long as the original method was not declared final.
  • However, you can't override a static method with a non static method. In other words, you can't change a static method into an instance method of a subclass.
 
Your Name Your Email-ID
Your Answer
4. What is a Java Virtual Machine?
 
  • A Java Virtual Machine is a runtime environment required for execution of a Java application.
  • Each Java application runs inside a runtime instance of some concrete implementation of abstract specifications of JVM.
  • It is JVM which is crux of platform independent nature of the language.
 
Your Name Your Email-ID
Your Answer