Java and doubt .

class Test {

void f() { throw new __ ; }

public static void main(String[] args) __ Exception {

Test t = new Test();

try {

t.f();

}

catch(__ e) {

try{ throw ; }

catch(Exception ex) {

System.out.print("catch1");

ex;

}

finally {

System.out.print("finally1"); }

}

finally {

System.out.print("finally2");

System.exit(0);

}

}

}

--

Hints :

(Execption)e

e

throw

throws

RuntimeException()

Throwable()

Throwable

Please send me the answer. You have to put the hints.

[649 byte] By [Tatona] at [2007-10-3 2:18:15]
# 1
Will you never give up?
kajbja at 2007-7-14 19:17:07 > top of Java-index,Java Essentials,New To Java...
# 2
What's the deadline for this one ?
TimTheEnchantora at 2007-7-14 19:17:07 > top of Java-index,Java Essentials,New To Java...
# 3
Kaj, was it so hard to give the answer?Is '42' such a hard thing to write?
bellyrippera at 2007-7-14 19:17:07 > top of Java-index,Java Essentials,New To Java...
# 4
> > Please send me the answer. You have to put the hints.This is my favorite part.(Not sure how the title has anything to do with this post example maybe Taton doubts anyone will really do his Java homework?)
zadoka at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 5
> Kaj, was it so hard to give the answer?> Is '42' such a hard thing to write?Jos are really good at these things. He does always stay within the lines whe he add colors to pictures.Kaj
kajbja at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 6

class Test {

void f() { throw new Enum ; }

public static void main(String[] args) public String toString () { return "Book";} Exception {

Test t = new Test();

try {

t.f();

}

catch(Grade.A e) {

try{ throw "Book"; }

catch(Exception ex) {

System.out.print("catch1");

enum ex;

}

finally {

System.out.print("finally1"); }

}

finally {

System.out.print("finally2");

System.exit(0);

}

}

}

TimTheEnchantora at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 7
Well done Tim!
PhHeina at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 8
> Please send me the answer. You have to put the hints.Why don't you post what you think the answer is (given it is multiply choice this is not really hard to do), then post the answer, and we will give you some hints where you are wrong.
mlka at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 9
Hint: Do your homework
r035198xa at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 10
Also:1. Use the code formatting button. Many (including me) don't bother reading large blocks of unformatted code.2. Use standard English. "Doubt" is the wrong word. Perhaps you mean "confusion" or "question."
Dick_Adamsa at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 11
Ok , i will do it myself.
Tatona at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 12
I'm waiting for someone to use the subject "Doubt doubt"
floundera at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 13

class TestExcep {

void f() { throw new RuntimeException() ; }

public static void main(String[] args) throws Exception {

TestExcep t = new TestExcep();

try {

t.f();

}

catch(Throwable e) {

try { throw (Exception)e ; }

catch(Exception ex) {

System.out.print("catch1");

throw ex;

}

finally {

System.out.print("finally1"); }

}

finally {

System.out.print("finally2");

System.exit(0);

}

}

}

Homework done.

Tatona at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 14
http://familyinternet.about.com/library/graphics/clipart/star1.gifAlthough it's a little tarnished!
floundera at 2007-7-14 19:17:08 > top of Java-index,Java Essentials,New To Java...
# 15

> I'm waiting for someone to use the subject "Doubt

> doubt"

there was a long discussion on Javaranch a few years ago called "the doubt about doubt".

Was rather interesting, until a few Indians got offended by the way their poor English skills were so blatantly exposed.

jwentinga at 2007-7-21 9:52:22 > top of Java-index,Java Essentials,New To Java...
# 16
> until a few Indians got offended by the way their poor English skills> were so blatantly exposed.No doubt!
floundera at 2007-7-21 9:52:22 > top of Java-index,Java Essentials,New To Java...
# 17
http://www.google.com/search?q=%22having+one+doubt%22
yawmarka at 2007-7-21 9:52:22 > top of Java-index,Java Essentials,New To Java...
# 18
> http://www.google.com/search?q=%22having+one+doubt%22Especially the 43rd hit
ScarletPimpernela at 2007-7-21 9:52:22 > top of Java-index,Java Essentials,New To Java...
# 19
> >> http://www.google.com/search?q=%22having+one+doubt%22> > Especially the 43rd hit:lol:
mlka at 2007-7-21 9:52:22 > top of Java-index,Java Essentials,New To Java...
# 20

> > I'm waiting for someone to use the subject "Doubt

> > doubt"

>

> there was a long discussion on Javaranch a few years

> ago called "the doubt about doubt".

> Was rather interesting, until a few Indians got

> offended by the way their poor English skills were so

> blatantly exposed.

Since I don't speak any indian (or singalese or whatever it is), I'm less inclined to sneer at their use of english. More power to them.

RageMatrix36a at 2007-7-21 9:52:22 > top of Java-index,Java Essentials,New To Java...
# 21
Explanation of Indian use of "doubt": http://www.numenorean.net/blog/archives/2006/07/vishys_indian_e_33.html
MLRona at 2007-7-21 9:52:22 > top of Java-index,Java Essentials,New To Java...
# 22
> Explanation of Indian use of "doubt":> http://www.numenorean.net/blog/archives/2006/07/vishys> _indian_e_33.htmlThat's intresting, thanks
zadoka at 2007-7-21 9:52:22 > top of Java-index,Java Essentials,New To Java...
# 23

> Explanation of Indian use of "doubt":

> http://www.numenorean.net/blog/archives/2006/07/vishys

> _indian_e_33.html

The blog author and I are of the same opinion; the use of "doubt" is more prevalent in South India than in the North. I do not recollect my family ever using the word "doubt"- although they could have. In which case, I would have a doubt about "doubt".

filestreama at 2007-7-21 9:52:22 > top of Java-index,Java Essentials,New To Java...