Advertisement
LoraOrliGeo

Main

Jul 3rd, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import person.Child;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6. public static void main(String[] args) {
  7.  
  8. Scanner sc = new Scanner(System.in);
  9.  
  10. String name = sc.nextLine();
  11. int age = Integer.parseInt(sc.nextLine());
  12.  
  13. Child child = new Child(name, age);
  14.  
  15. System.out.println(child.getName());
  16. System.out.println(child.getAge());
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement