class Employee { int DOB; int eid; String name; double salary; System.out.println(\"Employee class\"); }
If I write the
when it would be inside a class, but outside of any method, you cannot call it, you have to create method for example getData() and calling
Employee e = new Employee().getData();
properly writes your message.