Skip to content

Yash-Jadaun/OOPS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

OOPS

class Employee{ int id; String name; int salary; public void printDetails(){ System.out.println("My salary is" + salary); System.out.println("and my name is" + name); }

}

  public class oops_customclass {

public static void main(String[] args) {
   // System.out.println("This is our custom class");
    
   
   // setting attributes
    //Employee harry= new Employee();
    harry.id=12;
    harry.salary=1200;
    //harry.name="CodeWithHarry";
   // System.out.println(harry.id);
   // System.out.println(harry.name);
  //harry.printDetails();
    
  //Employee john= new Employee();
  //john.id=17;
  //john.name="john khandelwal";
  //john.printDetails();

  //harry.printDetails();
  //harry.printDetails();



}

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published