Jack Bento

Ranch Hand
+ Follow
since Jun 14, 2009
Merit badge: grant badges
For More
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 Jack Bento

thanks Christophe. I knew it was a school boy error of some sort
Hi there

I'm trying to compile the BeerSelect.java at the start of HFSJ. I added tomcats bin folder to the classpath but I can't get it to find the tomcat jar



please tell me what i'm doinig wrong. Thanks!
is the colour blue, blue?
Is there ever a reason to have a return statement? if not then I don't know why it compiles.
Why does this compile?

Hi there

Output is 22.

After the Base constructor the value of i is 2
After the Child constructor the value of i is 6
The bogo method then executes the Child method of add 6 + (8*2) = 22
Hi there

c3 never pointed to an object. A total of 4 objects were created. 2 are available for gc and 2 are still referenced by c2.


When line 16 is reached, how many objects will be eligible for garbage collection?

Is there really only 1 object eligible? I make it the 2 objects b1 & a1

Daniel Martins wrote: args.length=0 and will lead to arg[-1]



and that will throw the exception and output nothing

vicky ma wrote:but method belong to which interface ?

there should be some way..



why? by declaring the method it properly implements both interfaces
Hi there

Please can you tell me what i'm doing wrong:

I can run my program with this command in windows xp

C:\myProject\source3>java -cp c:\myproject\classes com.corp.Duck

I then test the classpath to check it is set to c:\myproject

C:\myProject\source3> echo %CLASSPATH%
c:\myproject

So I then thought that this command would also run my program:

C:\myProject\source3>java -cp \classes com.corp.Duck

but I get
Exception in thread "main" java.lang.NoClassDefFoundError: com/corp/Duck

I don't understand why it doesn't work.

Thanks in advance
Sorry I get it now. The first method belongs to scary. Thanks for helping me.