This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static method query?

 
kiran kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
class A{
static void methodA(){
System.out.println("in methodA");
}
public static void main(String ar[]){
A a1=new A();
a1.methodA(); //when we have to use this one
A.methodA(); //when we have to use this one

}
 
Rodrigo Lopes
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic