Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about classes

 
srikanth mycherla
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)by seeing a class how can i say whether it is a userdefined class or system defined class
2)by seeing a package how can i say whether it isa userdefined one or system defined one

3)is there any option of seeeing all classes and interfaces in a package using command prompt
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by srikanth mycherla:
1)by seeing a class how can i say whether it is a userdefined class or system defined class
2)by seeing a package how can i say whether it isa userdefined one or system defined one


There are no system defined classes or packages, Maybe you want to say SUN defined OR standard Java classes that comes with JDK.

All Standard classes are packaged in either java.package_name OR javax.package_name.

Originally posted by srikanth mycherla:

3)is there any option of seeeing all classes and interfaces in a package using command prompt


Yes, go to command prompt, change the directory to the package you want to explore and enter command dir *.class OR *.java , It list all the classes resides in that package.
 
srikanth mycherla
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks sagar

if i want to see all methods and classes and interfaces in java.lang.* what to type in command
can you say the command
is it cd java.lamg.*; at command prompt ..
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by srikanth mycherla:

if i want to see all methods and classes and interfaces in java.lang.* what


What's your need ! Do you want some kind of code which explore each and every package or just for sake of information !!

For first, Look out the Reflection class In Java for later need Look Java Docs
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic