Win a copy of Rust Web Development this week in the Other Languages forum!

lakshmi Nanda

Greenhorn
+ Follow
since May 13, 2007
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 lakshmi Nanda

Can anybody please explain what is JVM thrown exception and Programatically thrown exception. this is a question from java.Inquisition mock exam.

Fill in the table to indicate which Exception and Error classes are typically thrown programatically and which by the JVM.

This is the answer.

ArrayIndexOutOfBoundsException by JVM

ClassCastException by JVM

IllegalArgumentException Programatically

IllegalStateException Programatically

NullPointerException by JVM

NumberFormatException Programatically

AssertionError Programatically

ExceptionInInitializerError by JVM

StackOverflowError by JVM

NoClassDefFoundError by JVM

both NumberFormatException and StackOverfowError are unchecked exceptions
then why one is thrown programatically and another by JVM.

It is confusing.Can any body explain, or refer book .

Thanks
lakshmi
Hi Barry

Thanks for the advise. I understand.

I only gave the similar ones not exactly the same questions. In order to explain my doubts clearly.

Can I still dicuss about the topics, as general java doubts.

Thanks

Lakshmi
Hi I am new to Software Indus. I wrote SCJP 1.5 Exam. I got these qest. Can anybody help me. Thanks in advance.

1. static final int a[];
static {
a[0] =2;
}
What Exception will it throw?
The options given are :
a.staticIntializationExcetpion
b.statkOverFlowError
c.some exceptions
d.some exceptions

I think this code will cause a compiler error. But There is no compiler error in the options.

----
2.public class a{

//some code
public class aa implements Runnable{

//some code which produces some numerical output



}
}

What is the output ?

There is no compiler error in the option.

I think there shouldn't be more than one public class def. in a file. right?

------
3.class A {

void somemethod(){

}

class B extends A

void somemethod(){
}


What is the output when somemethod() called?

In the question they didn't mention how the somemethod() is called like

A a = new A();
a.somemethod();

or.

A ab = new B();

ab.somemethod();

or.

B b = new B();

b.somemethod().

If Iam wrong please correct me. thanks .
Also What is the best way to prepare for the Drag and Drop questions. I got many of them.
thanks for the advise
Hello

I am beginer to Java, changing my carrier to SW/Development. Its been two months since I started preparing for SCJP -055 . Iam using Kathy Sierra & Bert Bates SCJP exam guide and Wizlabs kit. After spending good amount of time every day, still Iam not ready to take the exam.

Can any body give some idea to prepare well for the exam.?



Thanks
Lakshmi