Problem in using Object datatype
I got problem in using Object Datatype its accepting value but the output coming in int format...
I'm using this codes.
import java.io.*;
import java.util.*;
import java.util.Scanner.*;
class Employee{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
try{
Object empID;
System.out.print("enter ID please : " );
empID = (Object) System.in.read();
System.out.print("Your ID : " + empID);
}
catch(IOException e){
System.out.print(e.getMessage());}
}
}
it will be highly appreciated if anyone tell me how to use object datatype.