Person

 avatar
shinta0x01
java
6 months ago
399 B
1
Indexable
Never
package tambaylangs;


class Person2{
	String name;
	int age;
	Person2(String name, int age){
		this.name = name;
		this.age = age;
	}
	
	void printDetails() {
		System.out.println("Name: " + name + " " + "Age: " + age);
	}
}



public class Person1 {

	public static void main(String[] args) {
		Person2 per = new Person2("Kenneth", 19);
		per.printDetails();
		

	}

}
Leave a Comment