View Single Post
  #7 (permalink)  
Old 05-05-2008, 05:12 AM
ubermeister ubermeister is offline
Member
 
Join Date: May 2008
Posts: 12
ubermeister is on a distinguished road
Quote:
Originally Posted by Eranga View Post
You asking that how to implement that method? There have few errors in your code. Try this.

Code:
// Collect data from the user public void getdata() { Scanner kb = new Scanner(System.in); System.out.print("Enter Name : "); name = kb.nextLine(); System.out.print("Enter ID : "); id = kb.nextInt(); System.out.print("Enter Salary : "); salary = kb.nextInt(); }
nonono thats not the code i'm referring to.
i'm talking about the FIRST code i have up i need to ADD a getData function with employee1 info in the main() function.
Reply With Quote