Java program using Hashmap (Employees & Designations)
Read moreHow do you input an age in Java?
println(“Enter your age :”); int age=s. nextInt(); System. out. println(“Enter your year of birth :”); String yr=s.
Read moreWhat is class and object in Java?
A class is a non-primitive or user-defined data type in Java, while an object is an instance of a class . A class is a basis upon which the entire Java is built because class defines the nature of an object.
Read moreWhat are the properties of an object in Java?
An object has three characteristics:
Read moreHow to add Student details in java?
Write appropriate member functions. Create another class students, which has id, name, date of birth and marks of 3 subjects as members. Write appropriate constructor for the student which assigns values to the members. Accept the details as command line arguments and create a student object using the arguments.
Read moreHow is PF percentage calculated in Java?
Include appropriate getters and setters method in Employee class. Write the following method in the Employee class: public void calculateNetSalary(int pfpercentage) – This method should take PF percentage as argument. Deduct the PF amount from the salary and set the netSalary.
Read more