Object problem in Java

help
java

#1

What about the objects which we define outside static method ? how to use them ?
Example:=> In the following code how to use object “obj1”. I know “obj1” can’t be used in static methods. But it can be used in non-static methods. So, How to use “obj1” in method “nonstatic” ?

Code:=>

class Test {
int a,b;
String name;
Test obj1=new Test();
public void nonstatic(){}
public static void main(String[] args){
System.out.println(“How to use obj1”);
}
}


#2

What have you tried?


#3

I have to say, he tried absolutely nothing, this is just a third same question… (http://discuss.codechef.com/questions/37985/problem-with-object-in-java , http://discuss.codechef.com/questions/37959/a-doubt-in-java )

@ayush1993 are you a spammer?


#4

:smiley: ROFL…


#5

@junior94 are you a bitch ??, What I ask and what u answer ??? and @junior94 and @betlista don’t comment if you are unable to answer my question.

The reason for repeating question is that I was not satisfied with your answer.


#6

@junior94 I fucked ur mother
let me ask what do u know about java???
You are behaving like u know complete java But the reality is that u don’t know anything about java…
That’s why I fucked ur mother…


#7

@ayush1993, clearly you haven’t practiced because the questions you ask are usually clarified when you try to solve exercises. Even if you can’t solve on your own, there is something called google (didn’t even take 5 minutes):
http://www.tutorialspoint.com/java/java_object_classes.htm

I never said anything about knowing complete Java, far from it but that time that you “fucked my mother” you could have spent learning…

AND WTF DUDE, I JUST ASKED: WHAT HAVE YOU TRIED? WHAT HAVE YOU ACTUALLY TRIED TO DO AND FAILED SO WE COULD HELP YOU? I WASN’T TRYING TO OFFEND YOU, YOU UNGRATEFUL BASTARD!!!