nowait shen

Greenhorn
+ Follow
since Jul 27, 2003
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 nowait shen

hi,Vidya Ram
Thanks for your great message~~~
I had been stuck in the problem for almost one afternoon before I finally saw your message~
I think IBM should put the link of this error-handling page right on the DB2's homepage!!
14 years ago
why not make run throw "RuntimeException?"
replace all Exception to RuntimeException, and the code will compile
thanks Jose! that's a great help!
I read the JLS 8.3.2.3 and seemed to understand it a little better, though it took me quite much much time to read those profound words and sentences
How strange these two examples are!!!
Would anybody like to explain how these two examples happen? and why the second example compiles without saying "illegal forward reference?
----------------------------------------------------------------
Example1:
public class MyClass
{
private static int x = y;
private static int y = 5;

private static int getValue()
{
return y;
}

public static void main(String args[])
{
System.out.println(x);
}
}
Result: compiler error, compiler says illegal forward reference
----------------------------------------------------------------------------
Example2
public class MyClass
{
private static int x =getValue();
private static int y = 5;

private static int getValue()
{
return y;
}

public static void main(String args[])
{
System.out.println(x);
}
}
Result: print "0"
----------------------------------------------------------------------------
1. No
2. I guess it's true
3. we access that with nonstaticmemeber()
see the following example
would anyone like to tell me why the following 2 declaration statement are valid?
char b = '\61';
char c = '\061';
thanks!