Skip to main content

Java Keywords



Java Keywords

Some identifiers are reserved in Java which has separate functionality and meaning such type of reserved identifiers are called reserved words/Java Keywords and these cannot be used as identifiers in java.

53 Keywords/Reserved words are there in java
50 are keywords-----------48 used keywords, 2 unused keywords (goto, const)
3 reserved literals---------- true,  false, null

Keywords for primitive data types(8)
1)byte 2)short 3)int 4)long 5)float 6)double  7)char 8) Boolean
Keywords for flow control(11)
1) if 2) else 3) switch 4)case 5)default 6)for
7) do 8) while 9) break 10) continue 11) return
Keywords for Exception Handling(6)
1)try 2)catch 3)finally 4)throw 5)throws 6)assert
Keywords for modifiers(11)
1)public 2)private 3)protected 4)static 5)abstract 6)strictfp 7)final 8)transient 9)native 10)volatile 11)synchronized
Class related key words(6)
1)class 2)interface 3)package 4)extends 5)implements 6)import
Object related key words(5)
1)new 2)instanceof 3)super 4)this
Other(1)
1)Void
Unused keywords(2)
1)const 2)goto
Reserved literals(3)
1)true 2)false 3)null
New key words in j2SE 1.5(1)
1)enum

All the key words contains only lower case alphabet symbols

Comments

Popular posts from this blog

Yahoo! Calendar "Add Event" Seed URL Parameters

I can't seem to find any official documentation on this, so here are my notes. Some information gathered from  http://richmarr.wordpress.com/tag/calendar/ Other information gathered through trial and error, and close examination of the "Add Event" form on Yahoo!'s site. Yahoo! Calendar URL Parameters Parameter Required Example Value Notes v Required 60 Must be  60 . Possibly a version number? TITLE Required Event title Line feeds will appear in the confirmation screen, but will not be saved. May not contain HTML. ST Required 20090514T180000Z Event start time in UTC. Will be converted to the user's time zone. 20090514T180000 Event start time in user's local time 20090514 Event start time for an all day event. DUR value is ignored if this form is used. DUR 0200 Duration of the event. Format is HHMM, zero-padded. MM may range up to 99, and is converted into hours appropriately. HH values over 24 hours appear to be modulated by 24. Durations t...

Java Data Types

In java any variable has a type, any expression has   a type and every type is strictly defined. Compiler will check all assignments for type compatibility .Hence java is considered as strong typed language. Java Language is not considered as pure OOP language because some non-objects (primitive data types) we have to maintain in our code .So sun people has introduced wrapper class to convert primitive to object form. DATA TYPE SIZE RANGE WRAPPER CLASS Default value byte 1byte -128 to +127 Byte 0 short 2 bytes -32768 to +32767 Short 0 int 4 bytes -2147483648 to +2147483647( Integer 0 long 8 bytes -2 pow 63 to 9223372036854775808L Long 0 float 4 bytes -3.4e38 to + 3.4e38 Float 0.0 double 8 bytes ...