steps: when u open any .class file.u can see first 4 characters.u have read those characters from the class file and convert those characters into Hexadecimal using toHexString method in Integer wrapper class.
Total Answers and Comments: 3
Last Update: August 16, 2006 Asked by: tirupathaiah
RE: What is magic word in java? and How to find it?
As I have understood Java in my last 7 years of experience, Magic Words are deprecated reserved (key) words.
Why do we call it as Magic Word is that reserved is no more in the language, but still compilers recognises it.
For example. If you take goto, const reserved words in Java, these two are no more, but compiler recognises, why because, VM should run the old code. That is, it is there with VM. So that soft of words are called "Magic Words".
RE: What is magic word in java? and How to find it?
Sometimes the specification for a programming language will have reserved words that are intended for possible use in future versions. In Java, const and goto are reserved words — they have no meaning in Java but they also cannot be used as identifiers. By "reserving" the terms, they can be implemented in future versions of Java without "breaking" older Java source code. Thanks & Regards -Narasimha Rao Konjeti
RE: What is magic word in java? and How to find it?
A reserved word, sometimes called a magic word is a word which, in some computer programming language cannot be used as an identifier because it is already used for some grammatical purpose. For instance, in SQL a user cannot be called 'group' because the word 'group' is used to indicate that an identifier refers to a group, not a user. Such a word is a keyword it is because its use is restricted that it is also a reserved word.
Sometimes the specification for a programming language will have reserved words that are intended for possible use in future versions. In Java const and goto are reserved words — they have no meaning in Java but they also cannot be used as identifiers. By "reserving" the terms, they can be implemented in future versions of Java without "breaking" older Java source code