daily notes
Date:
package com.um.test;
public class Test {
public static void main(){
}
public static void main(String[] args) {
Cat cat1=new Cat();
cat1.name="Tommy";
cat1.age=2;
System.out.println(cat1);
System.out.println(Cat.walk("lion"));
System.out.println(Cat.age);
Cat cat2=new Cat();
System.out.println(cat2);
cat2.name="tommy2";
Cat.age=3;
System.out.println(cat2);
Cat cat3=new Cat();
System.out.println(cat3);
/*Emp emp=new Emp();
emp.name="baya";
emp.org="tcs";
emp.sal=10000;
System.out.println(emp.name);
System.out.println(emp.org);
System.out.println(emp.sal);*/
}
}
package com.um.test;
public class Test {
public static void main(){
}
public static void main(String[] args) {
Cat cat1=new Cat();
cat1.name="Tommy";
cat1.age=2;
System.out.println(cat1);
System.out.println(Cat.walk("lion"));
System.out.println(Cat.age);
Cat cat2=new Cat();
System.out.println(cat2);
cat2.name="tommy2";
Cat.age=3;
System.out.println(cat2);
Cat cat3=new Cat();
System.out.println(cat3);
/*Emp emp=new Emp();
emp.name="baya";
emp.org="tcs";
emp.sal=10000;
System.out.println(emp.name);
System.out.println(emp.org);
System.out.println(emp.sal);*/
}
}
output:-
Comments
Post a Comment