Java Interview Questions: – 25 Basics interview questions on Java?

  • What if the main method is declared as private?
  • What if the static modifier is removed from the signature of the main method?
  • Can we define private and protected modifiers for variables in interfaces?
  • Can there be an abstract class with no abstract methods in it?
  • What modifiers are allowed for methods in an Interface?
  • What is a local, member and a class variable?
  • What does it mean that a method or field is “static”?
  • Is null a keyword?
  • What modifiers may be used with an inner class that is a member of an outer class?
  • What is class path?
  • What is path?
  • What is the difference among JVM Spec, JVM Implementation, JVM Runtime?
  • What are JDK and JRE?
  • What is JIT?
  • What is a JVM heap?
  • What is sandbox?
  • What is Locale?
  • What is a ResourceBundle class?
  • How will you get the platform dependent values like line separator, path separator, etc?
  • How does garbage collector decide which objects are to be removed? Can garbage collector be forced?
  • What is the final keyword denotes w.r.t class, method and variable?
  • What are the methods in Object?
  • Can you instantiate the Math class?
  • What is the difference between the instanceof and get class, these two are same or not?
  • Can main method be declared final?

View the following video on Batch Processing in Java: –


For more on Java interview questions so click and visit.

Regards,

Author’s more on Java interview questions

21 important Java/J2EE interview questions

21 important Java/J2EE interview questions: –

This following part will cover the most asked Java/J2EE interview questions during Java/J2EE interview.

So have a look on the same and do revise it when ever you go for the Java/J2EE interview questions interview.

Normally the Java’s interviewer starts with…..

  • What is the difference among JVM Spec, JVM Implementation, JVM Runtime?
  • What are JDK and JRE?
  • What is JIT?
  • What is a JVM heap?
  • What is sandbox?
  • What is Locale?
  • What is a ResourceBundle class?
  • How will you get the platform dependent values like line separator, path separator?
  • How does garbage collector decide which objects are to be removed? Can garbage collector be forced?
  • What is the final keyword denotes w.r.t class, method and variable?
  • What are the methods in Object?
  • Can you instantiate the Math class?
  • What is the difference between the instanceof and getclass, these two are same or not?
  • Can main method be declared final?
  • What is a native method?
  • Does Java provide any construct to find out the size of an object?
  • Is Empty .java file a valid source file?
  • Can a .java file contain more than one java classes?
  • What is the difference between an argument and a parameter?
  • What are the different scopes for Java variables?
  • What are wrapper classes?

Also see the following video on on FlyWeight Pattern which will help you to boost your interview preparation: –

Get more study materials on Java/J2EE interview questions.

Regards,

See for more author’s other blog on Java/J2EE interview questions.