Win a copy of Rust Web Development this week in the Other Languages forum!

satyen sanghavi

Greenhorn
+ Follow
since Mar 19, 2008
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 satyen sanghavi

can anyone explain me how the JVM handles the events ?
i mean to say when i press a button (or anything which will generate an event) what happens in the core java and how it interacts with my event handling code ?
Well done Vivek !!
It's nice to know people are getting that much score.
non-static inner classes cannot have static data, static fields, or static inner classes. However, static inner classes can have all of these:
Congratulations!!! for all ur achievements
u can declare new method in B say bmethod from this u can call
super.method()
and from C u can call super.bmethod()
latha ,I think that is true for compilation only not for execution. FYI there are different rules for compilation and execution in casting.
Original code is :
class super1{
void amethod(int i){
System.out.println("int value");
}
}
class sub extends super1
{
void amethod(long i){
System.out.println("long value");
}
public static void main(String a[])
{new sub().amethod(10);
}
}
fails to compile because of the way u r calling amethod.
if u call a methos like
new sub().amethod(10L); it will compile and work as u want.
now the problem with ur version is there are two amethod() which can accept int parameter the one is amethod(int i) and another is amethod(long i)
so the compiler gets confused.
make any sense ?