The Artima Developer Community
Sponsored Link

Java Answers Forum
Importing classes

1 reply on 1 page. Most recent reply: Nov 21, 2005 10:15 PM by Kondwani Mkandawire

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Joe Spoot

Posts: 4
Nickname: sllobb
Registered: Nov, 2005

Importing classes Posted: Nov 21, 2005 12:12 PM
Reply to this message Reply
Advertisement
If I have made a class named PERSON, what do I have to write in another .java document to be able access and make objects of type PERSON?


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Importing classes Posted: Nov 21, 2005 10:15 PM
Reply to this message Reply
> If I have made a class named PERSON, what do I have to
> write in another .java document to be able access and make
> objects of type PERSON?
PERSON person = new PERSON();
//  That is if you have the constructor:
//     public PERSON() in PERSON

Honestly though, you should probably come back with a more
specific question. Coz there is a whole lot of stuff you
probably need to know such as accessing Methods in that
class (I'm assuming you're a Newbie), etc...

I suggest you google a Java Classes Tutorial. Or Java
Objects Tutorial after a few hours of reading and toying
around with some examples I'm sure you'll have some more
specific questions.

Good luck.

Flat View: This topic has 1 reply on 1 page
Topic: Comparing Command-Line Arguments Previous Topic   Next Topic Topic: Running an Excel program from Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use