Gauri Telang

Greenhorn
+ Follow
since Jun 29, 2004
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 Gauri Telang

When is the text "Hi there" displayed?
public class StaticTest {
static {
System.out.println("Hi there") ;
}

public void print() {
System.out.println("Hello") ;
}

public static void main(String args []) {
StaticTest st1 = new StaticTest() ;
st1.print() ;
StaticTest st2 = new StaticTest() ;
st2.print() ;
}
}

a) Never.
b) Each time a new object of type StaticTest is created.
c) Once when the class is loaded into the Java virtual machine.
d) Only when the main() method is executed.

is it D or D ? can anyone explain briefly
correction - i meant is it C or D?
hi Ashok,

I found the Marcus Green mock exams(3)
Can u (or anyone) please mention the websites for rest of the mock exams
(i.e two k&b mocks and one khalid mughal mock and one voodoo mock)

Thanks in advance
Given this code snippet:
try {
tryThis() ;
return;
} catch (IOException x1) {
System.out.println("exception 1") ;
return;
} catch (Exception x2) {
System.out.println("exception 2") ;
return;
} finally {
System.out.println("finally") ;
}
What will appear in the standard output if tryThis() throws a NumberFormatException?
Select the one right answer.
a.Nothing
b."exception 1", followed by "finally"
c."exception 2", followed by "finally"
d."exception 1"
e."exception 2"

since the try block does not throw the checked exception(IOException) given in the catch block this will give compile error right? but there is no compile error option. in this case should we select a or should it b left unanswered ?

Thanks in advance
Question on exceptions..

Imagine there are two exception classes called Exception1 and Exception2 that descend from the Exception class. Given these two class definitions:
class First {
void test() throws Exception1, Exception2 { . . . }
}
class Second extends First {
void test() { . . . }
}
Create a class called Third that extends Second and defines a test() method. What exceptions can Third�s test() method throw?
Select all valid answers.
a.Exception1
b.Exception2
c.no checked exceptions
d.any exceptions declared in the throws clause of the Third�s test() method.

I think the answer is a,b,c.. is that right ?

Another question...

Assuming a method contains code which may raise an Exception (but not a RuntimeException) what is the correct way for a method to indicate that it does not handle that exception:
A.throw Exception
B.throws Exception
C.new Exception
D.Don't need to specify anything

i think it is B since exception is uncertain.. or is it C? when is new Exception thrown ?
Thanks in advance
Hi,

In SCJP1.4, will no of options for each question be specified ?

Thanks in advance
Hi Vikas,

CONTACH:
AI Soft Technologies Pvt Ltd,AI Soft House

No:6, Church Road,Basavanagudi,

Bangalore-560004

Tele:080-26577410/26573026.

Fax:080-26563587

Mobile:9845574490

Email:martin@aisoft-tech.com
Hi Hemant,

To purchase the Sun Exam Voucher.

Payment mode :Rs.7200/-should be paid in the form of DD in favour of AI Soft Technologies (P) Ltd, payable at Bangalore to be couriered to the below mentioned address.

Martin Thangamani[HR-Manager]

AI Soft Technologies Pvt Ltd,AI Soft House

No:6, Church Road,Basavanagudi,

Bangalore-560004

Tele:080-26577410/26573026.

Fax:080-26563587

Mobile:9845574490

Email:martin@aisoft-tech.com
got it...

i had to put java/lib file path (the ususal stuff we put in classpath) in the eclipse.properties file in the plugins/org.eclipse.osgi_3.0.0/ directory.

thanx for the help
gauri
hi bharat,

i am sorry ..my mistake...i posted classpath instead of path in hurry...

my path is ...

C:\ODI\OStore\bin;C:\oracle\ora92\bin;%SYSTEMROOT%;%SYSTEMROOT%\system32;%SYSTEMROOT%\system32\WBEM;C:\Program Files\Symantec\pcAnywhere\;C:\Program Files\IQSC\Q+E;C:\bea_81SP2\jdk141_05\bin

i have removed oracle jre bin directory. but still the problem persists...

do i have to insall eclipse ? when i unzipped the downloaded zip file...it straightaway gave eclipse.exe with other files. i did not do anything special for installing eclipse. am i missing something there ?

gauri
Hi Bharat

i have had a look at the thread that u suggested

This is my classpath

.;C:\bea\weblogic700\server\lib\webservices.jar;C:\bea\weblogic700\server\lib\weblogic.jar;C:\bea\weblogic700\server\lib;C:\bea_81SP2\jdk141_05\jre\lib;C:\bea_81SP2\jdk141_05\jre\lib\ext;C:\bea_81SP2\jdk141_05\lib;C:\bea_81SP2\jdk141_05\bin;C:\oracle\ora92\jdbc\lib\classes12.zip;C:\Program Files\Altova\xmlspy\XMLSpyInterface.jar

i have proper java dirs in classpath. Let me know if you some problem there.

Also can you tell me where is this 'org.eclipse.core.runtime.adaptor.EclipseStarter' placed ? May be i am missing some important jar file..

Thanks
Gauri
yes,

i am using jdk141_05
Hi,

i have downloaded eclipse 3.0.

when i strart eclipse.exe it gives the following error.

!SESSION Tue Jun 29 02:36:56 EDT 2004 ------------------------------------------
!ENTRY org.eclipse.core.launcher 4 0 Jun 29, 2004 02:36:56.740
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at org.eclipse.core.launcher.Main.basicRun(Main.java:180)
at org.eclipse.core.launcher.Main.run(Main.java:644)
at org.eclipse.core.launcher.Main.main(Main.java:628)


am i missing some components ?

Thanks
Gauri