Interview Quetions of JAVA

July 31, 2016 by Arti Khedkar

Filed under java

Last modified July 31, 2016

 

Interview Questions of JAVA

 

  • what do you know about Java?
  • What are the supported platforms by Java Programming Language?
  • List any five features of Java?
  • Why is Java Architectural Neutral?
  • How Java enabled High Performance?
  • Why Java is considered dynamic?
  • What is Java Virtual Machine and how it is considered in context of Java’s platform independent feature?
  • List two Java IDE’s?List some Java keywords(unlike C, C++ keywords)?
  • What do you mean by Object?
  • Define class?What kind of variables a class can consist of?
  • What is a Local Variable?
  • What is a Instance Variable?
  • What is a Class Variable?
  • What is Singleton class?
  • What do you mean by Constructor?
  • List the three steps for creating an Object for a class?
  • What is the default value of byte datatype in Java?
  • What is the default value of float and double datatype in Java?
  • When a byte datatype is used?What is a static variable?
  • What do you mean by Access Modifier?
  • What is protected access modifier?
  • What do you mean by synchronized Non Access Modifier?
  • According to Java Operator precedence, which operator is considered to be with highest precedence?
  • Variables used in a switch statement can be used with which datatypes?
  • When parseInt() method can be used?
  • Why is String class considered immutable?
  • Why is StringBuffer called mutable?
  • What is the difference between StringBuffer and StringBuilder class?
  • Which package is used for pattern matching with regular expressions?
  • util.regex consists of which classes?
  • What is finalize() method?
  • What is an Exception?
  • What do you mean by Checked Exceptions?
  • Explain Runtime Exceptions?
  • Which are the two subclasses under Exception class?
  • When throws keyword is used?
  • When throw keyword is used?
  • How finally used under Exception Handling?
  • What things should be kept in mind while creating your own exceptions in Java?
  • Define Inheritance?
  • When super keyword is used?
  • What is Polymorphism?
  • What is Abstraction?
  • What is Abstract class?
  • When Abstract methods are used?
  • What is Encapsulation?
  • What is the primary benefit of Encapsulation?
  • What is an Interface?
  • Give some features of Interface?
  • Define Packages in Java?
  • Why Packages are used?
  • What do you mean by Multithreaded program?
  • What are the two ways in which Thread can be created?
  • What is an applet?
  • An applet extend which class?
  • Explain garbage collection in Java?
  • Define immutable object?
  • Explain the usage of this() with constructors?
  • Explain Set Interface?
  • Explain TreeSet?
  • What is Comparable Interface?
  • Difference between throw and throws?
  • Explain the following line used under Java Program −
  • public static void main (String args[ ])
  • Define JRE i.e. Java Runtime Environment?
  • What is JAR file?
  • What is a WAR file?
  • Define JIT compiler?
  • What is the difference between object oriented programming language and object based programming language?
  • What is the purpose of default constructor?
  • Can a constructor be made final?
  • What is static block?
  • Define composition?
  • What is function overloading?
  • What is function overriding?
  • Difference between Overloading and Overriding?
  • What is final class?
  • What is NullPointerException?
  • What are the ways in which a thread can enter the waiting state?
  • How does multi-threading take place on a computer with a single CPU?
  • What invokes a thread’s run() method?
  • Does it matter in what order catch statements for FileNotFoundException and IOException are written?
  • What is the difference between yielding and sleeping?
  • Why Vector class is used?
  • How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
  • What are Wrapper classes?
  • What is the difference between a Window and a Frame?
  • Which package has light weight components?
  • What is the difference between the paint() and repaint() methods?
  • What is the purpose of File class?
  • What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
  • Which class should you use to obtain design information about an object?
  • What is the difference between static and non-static variables?
  • What is Serialization and deserialization?
  • What are use cases?Explain the use of sublass in a Java program?
  • How to add menushortcut to menu item?
  • Can you write a Java class that could be used both as an applet as well as an application?
  • What is the difference between Swing and AWT components?
  • What’s the difference between constructors and other methods?
  • Is there any limitation of using Inheritance?

Leave a Comment