Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

kuldeep kalla

Greenhorn
+ Follow
since Mar 09, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by kuldeep kalla

hello every body,
1. please tell me how we can identify that a program will throw an exception or it will generate a compiler error .
2. for exam point of view(scjp) i have to remember all the exception methods related to checked exception & runtime exception.
thenx
kuldeep
hello every body,
Q. Can we overload main method in a class with different arguments like -
1. public static void main(String[] args)
2. public static void main(int[] args).

if yes then it is not necessary that a class must contains a single main() method.
thanx
kuldeep kalla
Q. consider the following program
public class Test { public static void main(String args[])
{boolean a = false ; if(a=true)
System.out.println("Hello");
Else
System.out.println("Goodbye");
}
}
what is the result
A. A program produce no output terminate correctly.
B. program does not terminate.
C. prints out "Hello".
D. prints out "Goodbye".
select the most appropriate answer.
Answer is c
my confusion is the the program contains an error Else,will compiler not report about that error
thanx
kuldeep
Q. what is the result of executing the following class.
import java.awt.*;

public class FrameTest extends Frame {
public FrameTest() {
add(new Button("First"));
add(new Button("Second"));
add(new Button("Third"));
pack();
setVisible(true);
}
public static void main(String args[]){
new FrameTest();
}
}
select from the following option
A. Nothing happens.
B. Three buttons are displayd across the window.
C. A run time exception is generated (no layout manager is specified).
D. only the "First" button is displayed.
E. only the "Second" button is displayed.
F. only the "Third" button is displayed.
select the most appropriate answer.
the answer is f
why ?
thanx
kuldeep
hello
Q. what is the effect of issuing a wait() method on an object .
A. if a notify() method has already been sent to that object then it has no effect.
B. the object issuing the call to wait() will hait untill another object sends a notify or notifyAll().
C. an exception will be raised.
D. the object issuing the call wait() will be autometically synchronized with any other objects using the receiving object.

the answer is B
but i could not get the question & also the answer .

thanx

kuldeep
hello ,
i had read on lots of sources that float f =1.0; is legal,where as at lots of sources tell's that it should be float f=1.0f;
please tell me which one is correct about tht exam point of view.
thanx
kuldeep