I am new to Java and I am trying to find out a way to store information like a struct in C. Say for example I want to have a program hire employees. It would take from the user a first name, last name, and id number and would store it. The user could then view that information based off a condition (if the database had more than 1 employee for example). Can any suggest the best way for doing this?
Share
A struct in C just like a class in Java and much more powerful, because class in Java can contain method, and C++ does. You create a new class. For example :
And when you want to create multi employees, create array just like in C: