-
-
-
-
-
-
-
-
-
Why do threads block on I/O
Threads block on i/o (that is enters the waiting state) so that other threads may executewhile the i/oOperation is performed.
-
What is the Vector class
The Vector class provides the capability to implement a growable array of objects
-
What is the difference between a MenuItem and a CheckboxMenuItem
The CheckboxMenuItem class extends the MenuItem class to support a menu item thatmay be checked orunchecked.
-
Can a Byte object be cast to a double value
Answered by Scott on 2005-05-12 09:24:14: Byte b = new Byte((byte)5); double d = b.byteValue(); System.out.println( "The double value is: " + d );
-
Does a class inherit the constructors of its superclass
A class does not inherit constructors from any of its superclasses.
-
When does the compiler supply a default constructor for a class
The compiler supplies a default constructor for a class if no other constructors areprovided.
-
What are the Object and Class classes used for
The Object class is the highest-level class in the Java class hierarchy. The Class class isused to representthe classes and interfaces that are loaded by a Java program.
-
Compare SWING components to standard AWT.
Swing is an extension of, and not a replacement for the AWT. There is some overlap between AWT and Swing (for example a Swing JButton component might be viewed as an improved functional replacement for an AWT Button component.) One of the advantages of Swing components is that because the components are not rendered on the screen by the operating system, the look and feel of a component does not change...
-
What is Java Beans ?
According to JavaSoft, "A Java Bean is a reusable software component that can be manipulated visually in a builder tool."
-
In Java, You can create a String object as: String str = "abc"; & String str = new String("abc");Why cant a button object be created as : Button bt = "abc" Why is it compulsory to create a button object as: Button bt = new Button("abc"); Why is this not compulsory in String's case?
The main reason you cannot create a button by Button bt1= "abc"; is because "abc" is a literal string (something slightly different than a String object, bytheway)and bt1 is a Button object. That simple. The only object in Java that can be assigned a literal String is java.lang.String. Important to note that you are NOT calling a java.lang.String constuctor when you type String s = "abc";For example String...
-
How can you achieve Multiple Inheritance in Java?
Java's interface mechanism can be used to implement multiple inheritance, with one important difference from c++ way of doing MI: the inherited interfaces must be abstract. This obviates the need to choose between different implementations, as with interfaces there are no implementations.
-
What is the difference between an Applet and an Application?
1. Applets can be embedded in HTML pages and downloaded over the Internet whereas Applications have no special support in HTML for embedding or downloading.2. Applets can only be executed inside a java compatible container, such as a browser or appletviewer whereas Applications are executed at command line by java.exe or jview.exe.3. Applets execute under strict security limitations that disallow certain...
Java Interview Questions
Ans