Home Tutorialhelp Comment SCJP problem

 
 

Comment

Preetika
SCJP problem,
April 21, 2009 at 11:07 AM

Given:
31 //some code here
32 try{
33 //some code here
34 }catch (SomeException ex){
35 //some code here
36 }finally {
37 //some code here
38 }
select appropriate answer?

A.The instance get garbage collected.
B.Code in line 33 throws an exception.
C.Code in line 35 throws an exception.
D.Code in line 31 throws an exception.
E.Code in line 33 executes successfully.
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Java Beginners

try catch method in java
try catch method in java  try catch method in java - when and how should i use the try and catch method in Java ?   Please visit the following links: http://www.roseindia.net/help/java/t/java-try.shtml http 

IDE Questions

Nested try
: java Demo 2 3, it will give output 0 , the try block of method is called which... is converted to int and gives 0. java Demo 2 2, it will give output 1 , the try.... java Demo 3 2, it will give output 0 , the try block of method is called which 

Java Beginners

SCJP - Java Beginners
SCJP  Need help for SCJP Exam preparation 

Java Beginners

help please!!! T_T
help please!!! T_T  what is wrong in this?: import java.io.*; class InputName static InputStreamReader reader= new InputStreamReader(system.in); static BufferedReader input= new BufferedReader (reader); public static void main 

General

SCJP Module-2 Question-3
What is the Output of below code after compilation : 1 .public class Question3{ 2 .public static void main(String[] args) { 3 .try { 4 .int a= (int.... 3.Unresolved compilation problem. 4.a=2 or a=1 or i >2.5 Value of i =null Answer 

Java Server Faces Questions

t:selectOneMenu - Java Server Faces Questions
select One Menu  Hi, I wanted to create a menu to select or choose from ..for my home page.Can anyone please help?Thanks in Advance.  Hi friendRead for more information,http://www.roseindia.net/jsf/selectOneMenu.shtml 

Java Interview Questions

SCJP - Java Interview Questions
SCJP  i need scjp 5.0 dump 

Java Beginners

java try catch
java try catch  try{ return 1; }catch(exception e){ return 2; } finally{ Return 3; } What is the out put if any exception occurred 

Java Beginners

scjp 310-065 - Java Beginners
scjp 310-065  can you post me (scjp 310-065) successfull dump. its very urgent. because my scjp paper is very near. thank you 

Java Beginners

java help - Java Beginners
java help  Code a try statement that catches an IOException and an EOFException. If an IOException occurs, print the message ?An I/O error occurred....? to the console. You don?t need to code anything within the try block 

Java Interview Questions

problem
problem  hi'sir mai niit student hu.mujhe java ka program samaj me nhi aata mai kya karu and mai kaise study karu please help me.   Learn Java from the given link: Java Tutorials 

General

T - Java Terms
T - Java Terms      ... arranged in a sorted order.    Java try, catch, and finally The try, catch, and finally keywords are Java keywords that are used 

Java Beginners

SCJP - Java Beginners
SCJP  I want to take SCJP certification exam. But i don't know that which when i should take i mean SCJP 5 or 6 ? Please let me know, which one will be benificial 

General

SCJP Module-4 Question-7
the 'Twin' method in "Subexample7" doesn't have " 

Java Beginners

java: try finally blocks execution
java: try finally blocks execution  java: try finally blocks execution 

Java Beginners

java help - Java Beginners
java help  Code a try statement that parses a string variable named...? to the console. Don?t code a catch block for the IllegalArgumentException. Write code that prints the message ?Try statement completed? to the console regardless 

General

SCJP Module-2 Question-4
Find the Output Of the following Code: 1.  import java.io.*; 2.  public class Example4 { 3.  public static void main(String[] args) { 4.  Example4 e4 = new Example4(); 5.  try{ 6.  e4.check();} 7.  

Java Beginners

java problem - Java Beginners
java problem  Write a program that could be used to help children... problems they would like to try, and read this value from the keyboard... the main method  Hi Friend, Try the following code: import 

Core Java

try Java Keyword
try Java Keyword       The try is a keyword defined in the java programming language. Keywords... : -- The try keyword in java programming language is used to wrap the code in a block 

JavaScript Questions

help
by this formula: Total Payment = T‚?? T*(D/100) where T is the total purchase.... Based on the above scenario, write a complete Java program. Your program should 

JavaScript Questions

help
this in java then try this: import java.util.*; class SquareNumber { public....   Hi Friend, Try this: <html> <h3>Sqaure of Numbers< 

Java Beginners

java help - Java Beginners
java help  I would like to modify the client program so... handling to solve your problem. Code ===== import java.util.*; class... b ="); b=console.nextInt(); try{ div = a/b; while(div==0.0 

Java Beginners

java help - Java Beginners
java help  Write the code for a method named calculateTax..., Code to solve the problem : import java.io.*; class SalesTax... " + subtotal); System.out.println("Enter the number " + isFresno); try 

Java Interview Questions

help
(); } } SFDV2103 ‚?? Java Programming Fall, 2012 Term Project..., you are asked to make changes in the existing class. Problem: Open the class ‚... on the percentage of cheating. SFDV2103 ‚?? Java Programming Fall, 2012 Term 

Java Beginners

try and finally block
try and finally block  hello, If I write System.exit (0); at the end of the try block, will the finally block still execute?   hii, if we use System.exit (0); statement any where in our java program 

Java Beginners

code problem - Java Beginners
java script j2ee j2me sql plz help me to sort out this problem. thnx   Hi Friend, Please try the following sample code to solve your problem...code problem  Dear sir, I'm havin a problem that suppose i've got 

Java Beginners

Help with cypher and key problem in Java - Java Beginners
Help with cypher and key problem in Java  So far I have a program that asks a user for a message and a key amount and displays an encrypted message which is obtained by shifting the each character according to the key amount 

Java Beginners

Java Variables Help Please!
Java Variables Help Please!  Hi, I just started with java and i need help with my school project, this is it so far: import java.util.*; public...("+------------------+"); try { Thread.sleep(2500); } catch(InterruptedException e 

Java Beginners

code problem - Java Beginners
- hy, Line2- how r u? and so on... how to sort it out, plz help me  Hi friend, Code to help in solving the problem : import java.io.*; class FileRead { public static void main(String args[]) { try 

General

Nested Try-Catch Blocks
Nested Try-Catch Blocks       In Java we can have nested try and catch blocks. It means that, a try statement can be inside the block of another try. If an inner try 

Java Beginners

code problem - Java Beginners
today.xls, i want to open it thru java program, what code would be compatible plz help me  Hi friend, Code to help in solving the problem : import...) throws Exception { String file = "d:\\excel\\test.xls"; try 

General

Java try, catch, and finally
Java try, catch, and finally         The try, catch, and finally keywords are Java keywords... exceptions in Java is achieved through the use of the try and catch blocks. Catch 

Java Beginners

code problem - Java Beginners
.  Hi friend, Code to help in solving the problem : public class EncryptString { public static void main(String arg[]) { try...; String s = ""; while (ok) { System.out.print("Now try to enter 

Java Beginners

code problem - Java Beginners
; Hi friend, Code to help in solving the problem : import java.io.*; class FileRead { public static void main(String args[]) { try...code problem  Dear sir, my problem is given below: suppose a file 

Java Beginners

Bid Problem - Java Beginners
in this application explain in details : Code to help in solving the problem...) throws IOException{ try{ BufferedReader br = new BufferedReader(new...!"); } } } For more information on Java visit to : http 

Java Beginners

please help me to overcome this problem
please help me to overcome this problem  how to make it easy to write java code. can u please give me suggestions 

Java Beginners

code problem - Java Beginners
{ public static void main(String args[]) { try{ InputStreamReader input...()); } } } Dear sir, my problem is that suppose i enter line number: 3 if line... login. how to sort it out, help me plz.   Hi friend, We check 

Java Beginners

coding problem - Java Beginners
need to retrieve date from database to my java code.how can i please help me...; Statement stmt = null; try { Class.forName(driver); conn...(); } } } Hope that this will help you. Thanks 

Java Beginners

htmlcode problem - Java Beginners
to display textbox pls send me code for this Thank you for this help   Hi Friend, Try the following code: numLinesAdded=0; function 

JSP Servlet Questions

java Problem
java Problem  I want to create a binary tree for displaying members in Downline. i am creating a site for MLM(Multi-Level MArketing). tree must be dynamically populated from database. is there any help for me. Thanks in advance 

Java Beginners

plz help - Java Beginners
Thread in java : First Code : import java.io.PrintWriter; import...; import java.io.*; class MyThread1 implements Runnable{ Thread t...; MyThread1(String s1){ s=s1; t=new Thread(this); t.start 

Java Beginners

loop problem - Java Beginners
something. Can you help?   Hi Friend, Try the following code: class... that it will help you. Thanks 

Java Beginners

Problem with picture - Java Beginners
Problem with picture   Hi, I Develope a School Automated System... with Microsoft Database (MSSQL) Thanks Programmer. Please help to solve this  Hi Friend, To upload and insert the image into database, try the following 

Java Beginners

Java Leap Year Problem
Java Leap Year Problem  I need help with a writing a program in Java... with it, couild someone please help: public class Year { private int days; Year...(); year2000.getDays(); } }   Hi Friend, Try the followig code 

Java Beginners

java help!
java help!   I need help starting off a program I am trying to write for class. The class should contain a private instance variable to represent... celsius.There are more methods but I would prefer to try them myself! Can someone please 

Development process Questions

Java Web Browser Problem
Java Web Browser Problem  Hello When run my web browser this is not displaying complete page any of the website like other browser.So Plz help me... actionPerformed(ActionEvent e) { try 

Applet Questions

java applet problem - Applet
java applet problem  i was doing a program using java applet. I want... performed by the user. Please help me to solve this. Thanks.  Hi Friend, Try the following code: import java.applet.*; import java.awt.event. 

General

SCJP Module-2 Question-1
 

Java Beginners

java help?
java help?  Write a program, where you first ask values to an array with 6 integer values and then count the sum and average of the values in methods... out results in the main program   Hi Friend, Try the following code 

Java Beginners

java -netbeans help - Java Beginners
java -netbeans help   a simple program in netbeans ide to add two... in textarea that is created in input.java file   Hi Friend, Try... mail id pls pass it to punithap@gmail.com so i can contact u personnaly for help 

Java3D Questions

java help
java help  Design and implement a class called DateWriter that has three instance variables: a string for month, an integer for day, and an integer.... It doesn‚??t change the value of the year instance variable. 5) A method called 

Programming Tutorials

Sun Certified Java Professional (SCJP)
Sun Microsystem offers SCJP certification exams in two versions SCJP 5 CX-310-055 and SCJP 6 CX-310-065 certification exams in which SCJP 6 CX-310-065 certification examination is the latest version. For qualifying SCJP 5 CX-310-055 

General

SCJP Module-1 Question-5
 

JSP Servlet Questions

uploading problem
;charset=UTF-8" language="java" %> <%@ page import="java.io.*,java.sql.*,java.util.zip.*" %> <%@ page language="java" import="java.util....; try { items = upload.parseRequest(request 

JDBC Questions

jdbc problem
jdbc problem   hi my name is mohit...i am making a project in java swings....pls help me how to check that the username and password are correct... in the database....pls help me guys...i am new to java...pls help me learn... thanks 

Java Beginners

Java problem - Java Beginners
Java problem  I have an image in my application and I need to restrict the image path view on the browser. Noone should be able to right click and see the image path. Please help 

JSP Servlet Questions

query problem
to write this query in jsp please anybody help me, and send me that code.... <%@page language="java"%> <%@page import="java.sql.*"%> <table border="1"> <% try { Class.forName("com.mysql.jdbc.Driver").newInstance 

Java Beginners

can u plz try this program - Java Beginners
can u plz try this program  Write a small record management application for a school. Tasks will be Add Record, Edit Record, Delete Record, List.... --------------------- <%@ page language="java 

Java Beginners

java help - Java Beginners
java help  Code a try statement that catches... the message "Not a valid integer." to the console.   Hi friend, Code a try... NumberFormatExceptionExample1 { public static void main(String[] args) { try 

Java Beginners

Java Problem - Java Beginners
Java Problem  How to create executable file of a java program.That is steps to create a Jar File of a Java Program  Hi Friend, Try...(File jarFile, File[] listFiles) { try { byte b[] = new byte[buffer 

Java-Tutorials

The try-with-resource Statement
The try-with-resource Statement In this section, you will learn about newly added try-with-resource statement in Java SE 7. The try-with-resource... or work is finished. After the release of Java SE 7, the try-with-resource 

Java Beginners

Java Problem - Java Beginners
Java Problem  How to create a jar file of a program  Hi Friend, Try the following code: import java.io.*; import java.util.jar.... createJarArchive(File jarFile, File f) { try { byte b[] = new byte 

Java Beginners

scjp - Java Beginners
 

Java Beginners

JAVA Problem - Java Beginners
JAVA Problem  please help me!!!! How can i code in java using Two-dimensional Arrays? 88 90 94 102 111 122 134 75 77 80 86 94 103 113 80 83 85 94 100 111 121 68 71 76 85 96 110 125 77 84 91 98 105 112 119 81 85 90 96 102 

Java Beginners

java help - Java Beginners
java help  Code a try statement that calls the calculateDiscount... "); try { discountPct = Double.parseDouble(bufReader.readLine... information on Exception Handling in Java visit to : http://www.roseindia.net/java 

Java Beginners

java problem - Java Beginners
java problem  a) Binary numbers is important in computers. Binary... available in Java that will allow us to convert from denary integer (base 10..., To convert integer to binary, try the following code: import java.util. 

Java Beginners

Small typo at SCJP Module-1 Question-6
Small typo at SCJP Module-1 Question-6  Hi Team, This is a awesome site which is serving lot of peoples in learning java effectivly, thanks alot for that, A small typo at "SCJP Module-1 Question-6", in spite of "a.method 

JSP Tutorials

Try catch in JSP
Try catch in JSP          In try block we write those code which can... it is caught inside the catch block. The try catch block in jsp just work as try catch 

Java Beginners

help me to solve this problem..
help me to solve this problem..  Given below is a class definition for Book. Type and compile the class, and answer the following questions: class... public Book(String t, double p) { title = t; price = p; } public 

General

SCJP Module-3 Question-8
 

General

SCJP Module-5 Question-4
 

General

SCJP Module-4 Question-16
 

General

SCJP Module-2 Question-2
 

Java Beginners

java help - Java Beginners
java help  Code a statement to test a catch block that catches an IOException.  Hi friend, Code a statement to test a catch block... void main(String[] args) { try { InputStreamReader 

Java Beginners

Regular Expression Help Help HELP!!!!
Regular Expression Help Help HELP!!!!  HI all I am very new to java, but i have this problem i got a string e.g Courses['07001'].Title... *= *\"([^\"]+)\";"; But the problem now is, say i got string like Courses 

Development process Questions

help
help   how i can send a pitcture on url in java 

Java Beginners

java help - Java Beginners
java help  Code a catch block that catches an IOException, prints the message ?An I/O exception occurred.? to the console, and then throws...{ public static void main(String[] args) { try { File f; f=new File 

Java Beginners

java help - Java Beginners
java help  Write the code for a method named getFile that accepts a file name and returns a file created from the RandomAccessFile class. This method...[])throws IOException { FileInputStream fis=null; try{ fis = new FileInputStream 

Java Beginners

problem
problem  Hi, what is java key words   Hi Friend, Java Keywords are the reserved words that are used by the java compiler for specific... information, visit the following link: Java Keywords Thanks 

Java Beginners

Problem in java 1.6 - Java Beginners
Problem in java 1.6  Am facing problem in java 1.6 . Ex. In a Frame... then at the first click on the button wont works... Help to find the solution...  Hi friend, Give source code where you having the problem 

Java Beginners

Java help - Java Beginners
Java help  I didnot get the code ,therefore I am posting my question again.. Thanks in advance ...:) Programming Assignment: A) Consider.... ∑ Find the additional ADTs needed to solve this problem. ∑ Rewrite 

JSP Servlet Questions

Problem in uploading java application
Problem in uploading java application  I have uploaded my java...;%@page contentType="text/html" pageEncoding="UTF-8"%> Pls help me in solving this problem 

Java Beginners

JComboBox Display Problem - Java Beginners
3-1-2010 4-1-2010 Please help me  Hi Friend, Try the following code... windowClosing(WindowEvent we) { close(); } }); try...=Integer.parseInt(temp[2].trim()); //System.out.println(d1); try 

Java Beginners

Multiplication problem - Java Beginners
Multiplication problem  I am facing a peculiar problem in java regarding a multiplication. Please see below: 19300 * 0.001 = 19.3 19400 * 0.001 = 19.400000000000002 (why is this ??) 19500 * 0.001 = 19.5 Can anybody help 

Applet Questions

help
help  pls help me to get the code of a java program a program to perform different shapes in a menu using javaapplet 

Java Beginners

Java help - Java Beginners
Java help  Was this code created by netbeans or any other tool?? I am...(text.getText()); try { Class.forName("com.mysql.jdbc.Driver").newInstance... void actionPerformed(ActionEvent e){ try { Class.forName("com.mysql.jdbc.Driver 

XML Questions

Problem with external DTD - XML
(); String[] lstr={"JAVA","NET WORKING"}; String[] lstr1={"SCJP","NET...Problem with external DTD  Hi, This class generate an XML file.But... fos=null; try { String lsPath=readPath.getString("READ_PATH"); fos = new 

Java Beginners

help
help  i need help with this code. write a java code for a method named addSevenToKthElement that takes an integer array, and an integer k as its arguments and returns the kth element plus 7. any help would be greatly 

General

SCJP Module-4 Question-2
, method overriding is used. 2. Methods can't have the same name. 3. Methods 

Java Beginners

instalation problem - Java Beginners
instalation problem  i try to install java ver 3-4-5 but. when progres going on that cant configuration. its stop when the indicator running in 1/4 progres.. thanx 

JSP Servlet Questions

Need help on JAVA JSP
Need help on JAVA JSP  Hi, I have never worked on java and I have... using JAVA JSP). e.g. Tool does not adjust with the resolution of the screen...) Having problem in accessing it from remote machines. Any suggestions 

Java Beginners

code problem - Java Beginners
code problem  Dear sir, my problem is that I've a string value if this String value has "quit" then output should be "bye". i want to make... help me. thnx 

JSP Servlet Questions

problem running a servlet on tomcat.
be the problem? please help me out...problem running a servlet on tomcat.  i have followed the steps given... suppose that should mean that my tomcat server is up and running. but whn i try 

JDBC Questions

java programming problem - JDBC
java programming problem  Hi, Request you to provide a solution... problem to the following mail id : Problem : upload excel file data into oracle database using java / j2ee. mail id : raichallp@yahoo.co.in 

Java Beginners

JAVA CLASSPATH PROBLEM
JAVA CLASSPATH PROBLEM  hi all Friends I am stuck using the java servlets and problem raise for classpath. I had a problem with servlet to call... that it didn't found any java class (which is java class calling from servlet). but i 

General

SCJP Module-6 Question-23
Given below the sample code : public class Base { static String str = "-"; public static void main(String[] args) { try { throw new Exception(); } catch (Exception e) { try { try { throw new Exception(); } catch 

Java Beginners

Programming problem - Java Beginners
Programming problem  Good afternoon Ma'am/Sir, Can you help me... it difficult to learn java programming? Based on my survey it seems that java... help me.. Thank you 

Java Beginners

GUI problem - Java Beginners
GUI problem  how to write java program that use JTextField to input...; Handle the actionPerformed event for JButton and try doing something like...; Handle the actionPerformed event for JButton and try doing something like 

WebSevices Questions

help
help  Hii.. I have to design one registration page in java that looks like REGISTER USERNAME (here i have to check whether username already exists... to the user) please tell me how could i design that. Please help me asap Thanks a lot 

JDBC Questions

help!!!!!!!!!!!!!!!!!!
help!!!!!!!!!!!!!!!!!!  import java.awt.; import java.sql.*; import...(ActionEvent ae){ String t1=text1.getText(); String t=text.getText(); String t2...,phoneNo,email,address) values('"+t1+"','"+t+"',"+t2+",'"+t3+"','"+t4+"','"+t5 

Advertisements Advertisements
 

 

 

DMCA.com