wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes self test doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "self test doubt" Watch "self test doubt" New topic
Author

self test doubt

saloni jhanwar
Ranch Hand

Joined: Feb 09, 2012
Posts: 583

One of the Questions : BOOK K&B 6>PAGE 817

If the current directory is test, and you create a .jar file by invoking this,

A. Foo.java
B. Test.java
C. myApp/Foo.java
D. myApp/Bar.java
E. META-INF/Foo.java
F. META-INF/myApp/Foo.java
G. myApp/myAppSub/Bar.java

then which path names will find a file in the .jar file?

Why A is not correct ?


Tell the difficulties that i am difficult.
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

why you think that A option should be correct ???
saloni jhanwar
Ranch Hand

Joined: Feb 09, 2012
Posts: 583

gurpeet singh wrote:why you think that A option should be correct ???


Why it shouldn't be ??
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

think about it . you will come to know for yourself. as a hint , what is your current directory and then proceed.
saloni jhanwar
Ranch Hand

Joined: Feb 09, 2012
Posts: 583

gurpeet singh wrote:think about it . you will come to know for yourself. as a hint , what is your current directory and then proceed.


Why do you think that MyJar.jar hasn't Foo.java ?
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

no i'm not thinking that. myjar.jar has definitely got Foo in it. but just think what would be its hierarchy/directory structure in the jar file. if you can try jar -tf myjar.jar to see the structure of the jar. also look at the C option as well. by looking at the option , you can probably make out the difference.
saloni jhanwar
Ranch Hand

Joined: Feb 09, 2012
Posts: 583

ok thanks it was very easy so i got confused.i couldn't believe that.
saloni jhanwar
Ranch Hand

Joined: Feb 09, 2012
Posts: 583

gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

this is what is difficult in exam . how much you can keep your cool and focus . believe me exam questions are not so tough. but we have to solve them with real exam pressure and all that stuff. good luck and good night
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: self test doubt