rahul aditya

Greenhorn
+ Follow
since Mar 14, 2012
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 rahul aditya

it says non-static content this cannot be referenced from static content
12 years ago
yes, i couldn't find out what the error is? so i posted it here..
12 years ago
sorry, but i use net beans.. is there any compile option in net beans?
12 years ago
run:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - non-static variable this cannot be referenced from a static context
at bert.GameShape.main(GameShape.java:40)
Java Result: 1
BUILD SUCCESSFUL (total time: 6 seconds)
this was the error i got, could you please help me find out the problem?
12 years ago


[Edit - added code tags - see UseCodeTags for details]
12 years ago
can method overriding be done from the same class??
12 years ago
Thank you sir, it really did help me
i just found out the logic to be
a=a+b;
b=a-b;
a=a-b;
thank you very much
12 years ago
public class Swap {
public static void main(String[] args)
{
int a = 9;
int b = 7;
a=b;
b = (a+b)-b;
System.out.println("After swapping a = " + a + " b = " + b);
Swap s = new Swap();
}
}
12 years ago