Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Test {
- public static void main(String[] args) {
- //Student > class name
- // stu > oject name
- // new instantiating the object stu
- // Student() > constructor
- Student stu1 = new Student();
- stu1.printDetails();
- Student stu2 = new Student(123,"Serhat","Yücel",99.9);
- stu2.printDetails();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment