Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

class literal

Thread view: 
Sachin - 20 Sep 2006 13:57 GMT
Does this explain in the java documentation?
Is this a key word?
What is the purpose of this?

Thanks.
Thomas Weidenfeller - 20 Sep 2006 14:02 GMT
> Does this explain in the java documentation?
> Is this a key word?
> What is the purpose of this?

Check the language specification

http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#251530

Signature

The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/

Ian Shef - 26 Sep 2006 21:26 GMT
"Sachin" <mahalwarawa@gmail.com> wrote in news:1158757078.874500.282110
@k70g2000cwa.googlegroups.com:

> Does this explain in the java documentation?
> Is this a key word?
> What is the purpose of this?
>
> Thanks.

A search at http://java.sun.com quickly turned up:

http://java.sun.com/developer/TechTips/1997/tt1118.html#tip3

which explains the use of .class and provides an example.

See paragraphs 15.8 and 15.8.2 in the Java Language Specification (3rd
edition) available at
http://java.sun.com/docs/books/jls/index.html

Suppose that you have an object of class Abc.
Then Abc.class is an object of class java.lang.Class that represents that
class Abc.  
This object (Abc.class) can be passed as a parameter to a method.
It can also be queried for information about the class Abc.
See the javadocs for java.lang.Class.

Signature

Ian Shef     805/F6      *    These are my personal opinions    
Raytheon Company         *    and not those of my employer.
PO Box 11337             *
Tucson, AZ 85734-1337    *



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.