-
What are the two ways to create the thread?
A) by implementing RunnableB) by extending ThreadC) Both a and bD) None of the above
-
In order for a source code file, containing the public class Test, to successfully compile, which of the following must be true?
A) It must have a package statementB) It must be named Test.javaC) It must import java.langD) It must declare a public class named Test
-
-
Which of the following methods cause the String object referenced by s to be changed? (Select multiple)
A) s.concat( )B) s.toUpperCase( )C) s.replace( )D) s.valueOf( )
-
A method is overridden if there is a method in the subclass that has the same name and the ________ set of parameters.
Skill/Topic: InheritanceA) SameB) DifferentC) MixedD) None of the above
-
__________ code segments must be implemented for an event handler.
Skill/Topic: AWT & AppletsA) OneB) TwoC) ThreeD) Four
-
-
-
-
-
-
-
-
-
-
What is synchronization and why is it important
With respect to multithreading, synchronization is the capability to control the access ofmultiple threads to shared resources. Without synchronization, it is possible for onethread to modify a shared object while another thread is in the process of using orupdating that object's value. This often leads to significant errors.
-
-
What are wrapped classes
Wrapped classes are classes that allow primitive types to be accessed as objects.
-
Can a for statement loop indefinitely
Yes, a for statement can loop indefinitely. For example, consider the following:for(;;) ;
-
To what value is a variable of the String type automatically initialized
The default value of an String type is null.
Java Interview Questions
Ans