is try block possible without catch block?

Answers were Sorted based on User's Feedback



is try block possible without catch block?..

Answer / patil chaitanya

try
{
}
//without catch block
this ts not possible.
But
we can write the finally block below the try block.
Then try block possible without catch block.

Is This Answer Correct ?    1 Yes 0 No

is try block possible without catch block?..

Answer / pooja prasad

Yes it is. But try should follow final block.

Is This Answer Correct ?    0 Yes 0 No

is try block possible without catch block?..

Answer / t chinna shareef

Yes it is possible.
class Test{
public static void main(String[] args)throws Exception
try{
System.out.println("try without catch..!");
System.out.println(10/0);
}
finally{
System.out.println("Shareef");
}
}
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

what is lazy loading in hibernate?Explain in detailed manner?

2 Answers   IBM, TCS,


Is there any standard procedure to test the application as a whole? Or How can I test complete application right from the requirement gathering?

0 Answers  


What is %Type,%Rowtype?

0 Answers  


what is an INI file?

0 Answers   EID Parry,


8.In DSP,Define Signal and System?and various type of signals.

0 Answers  






How many types of list exist in the HTML

2 Answers  


Hey this is venkatesh.Please can any body tell me what is SFLNXTCHG?where we use this keyword?what perpuse we use this?Can you tell me in real time senario with example? And in 7 specification(RPG/400)what is the mandatory specification using programs?

0 Answers  


What Is The Difeerence Between C & C++

2 Answers   HCL,


Hi friends :) This Company Aptitude Questions were much easy. i have attended the interview but was not selected in the HR round. they used to ask questions like puzzles, English, fill up the sentence. for example : they asked one question like suraj, kumar, santhosh, ranga and ashwin are professionals in different fields. suraj is a doctor. kumar is not a musician.ranga is working as engineer. ashwin is from goa. santhosh is from chennai. suraj and ranga are not from delhi. find out who is working in which field and where are they from? it was not the exact question. i answered that question with correct answer. just thorough with SQL queries. they are much interested in that. i cleared Technical round where they asked me to write a C code for checking, if the given word is palindrome or not. also they asked 2 puzzle question to solve in front of them. then the asked SQL query for referring two tables. then, they sent me for HR round. i got little nervous in that round. so, could not answer them properly. In Hr round, they may ask Technical Questions. i was asked only Technical Questions in HR round. they asked questions from SQL queries and my project. i could not answer for the questions perfectly. so, i was not selected. anyway, try to be thorough with these info and rock in your interview. Thanks :)

0 Answers   Hewitt,


How can you incorporate a Datawindow to a Oracle8i stored procedure?

0 Answers   IBM,


what are wrapper classes

2 Answers  


Given a arbitrary pointer to an element in a singly linked list?what is the time complexity for its deletion .

1 Answers   Hughes,


Categories