Friday, 17 May 2013

JAVA Create a class

class abc{
           public void print(){
                  System.out.println("call print method");
            }
}
class file_name{

           public static void main(String ar[]){
                       abc s=new abc();

                       System.out.println("s is instance of the abc class");
           }

}


OutPut
--------------------
s is instance of the abc class

No comments:

Post a Comment