Advertisement
Tevronis

java

Sep 14th, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1. public class Student {
  2.     private String lastName;
  3.     private String firstName;
  4.     private String secondName;
  5.     private Integer studentId;
  6.     private Date birthday;
  7.     public Student(String Name, String FName, String SName, Integer Id, Date DR)
  8.     {
  9.         lastName = Name;
  10.         firstName = FName;
  11.         secondName = SName;
  12.         studentId = Id;
  13.         birthday = DR;
  14.     }
  15.     @Override
  16.     public String toString()
  17.     {
  18.         return this.lastName+" "+this.firstName+", "+this.secondName+" "+this.studentId+" "+this.birthday;
  19.     }
  20. }
  21.  
  22. public class Solution {
  23.     public static Student a1 = new Student("Enc", "Michail", "Vladimirovich", 8, new Date());
  24.     public static void main(String[] args)
  25.     {
  26.         System.out.println(a1);
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement