Java Q&a
Java Q&a
What is Java Virtual Machine and how it is considered in context of Java’s platform independent
feature?
Define class?
What is an Exception?
What things should be kept in mind while creating your own exceptions in Java?
Define Inheritance?
What is Polymorphism?
What is Abstraction?
What is Encapsulation?
What is an Interface?
What is an applet?
Explain TreeSet?
What is the difference between object oriented programming language and object based
programming language?
Define composition?
What is NullPointerException?
What are the ways in which a thread can enter the waiting state?
Does it matter in what order catch statements for FileNotFoundException and IOException are
written?
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
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?
Can you write a Java class that could be used both as an applet as well as an application?
Can you call one constructor from another if a class has multiple constructors?
What is synchronization?
Does garbage collection guarantee that a program will not run out of memory?
Under what conditions is an object's finalize() method invoked by the garbage collector?
What will happen if static modifier is removed from the signature of the main method?
Which method of the Component class is used to set the position and size of a component?
What is currentThread()?
Define canvas?
What is a Socket?
Which class is used by server applications to obtain a port and listen for client requests?
Which class represents the socket that both the client and server use to communicate with each
other?
What environment variables do I need to set on my machine in order to be able to run Java
programs?
If System.exit (0); is written at the end of the try block, will the finally block still execute?
What is an enumeration?
What are the restriction imposed on a static method or a static block of code?
What is Downcasting?
What are order of precedence and associativity and how are they used?
How does a try statement determine which catch clause should be used to handle an exception?
What will be the default values of all the elements of an array defined as an instance variable?