+ 9

Difference between Object and identifier.

hey all i have a doubt lets look here: Scanner fu = new Scanner(System.in); so fu is an object of Scanner class right? but some people also called fu is identifier here? So I'm wondering is there any difference or not? I'm all confused please clear it out.

19th Jul 2017, 3:37 PM
Fuyuka Ayumi(ć†ŹèŠ±)
9 Answers
+ 5
@Nirmal but String is an object in java, and i though println is a method of printStream.
19th Jul 2017, 3:55 PM
Fuyuka Ayumi(ć†ŹèŠ±)
+ 5
Arigatƍgozaimashita (Thank you both) for your help 😊😇
19th Jul 2017, 3:58 PM
Fuyuka Ayumi(ć†ŹèŠ±)
+ 3
Object is the instance of a class whereas Identifiers are the names of variables, methods, classes, packages and interfaces. here fu is an object of scanner class and not an identifer but Scanner itself is an identifier
19th Jul 2017, 3:44 PM
Nirmal Kumar Bhakat
Nirmal Kumar Bhakat - avatar
+ 3
@The Untold Programmer how about some examples?
19th Jul 2017, 3:49 PM
Fuyuka Ayumi(ć†ŹèŠ±)
+ 2
in the HelloWorld program, HelloWorld, String, args, main and println are identifiers. hope u know about examples of object
19th Jul 2017, 3:50 PM
Nirmal Kumar Bhakat
Nirmal Kumar Bhakat - avatar
+ 2
HelloWorld is the class name
19th Jul 2017, 3:51 PM
Nirmal Kumar Bhakat
Nirmal Kumar Bhakat - avatar