|
-
Newbie Question about Classes...
Hi All,
I've been programming in C++ for a few years and feel fairly comfortable
there. But recently I switched over to Java because, quite frankly, it's
easier. But I have a couple of questions about classes that I am hoping someone
will take the time to answer. I would really appreciate it.
1) I know that most serious Java programs use multiple class files. Why?
Is this simply to prevent the existance of a huge, slow, and virtually unrunnable
single class?
2) If not, under what circumstances do I need to use multiple class files.
For instance, I am writing a small telnet program in Java. If the user
clicks "Connect" and hasn't entered any server information I will display
a hand made dialog box telling him to go back and enter some information.
Should I put the code for this dialog box in a seperate class file?
3) How do I call methods in an external class file? Is it as simple as a
class.method() call?
I know these are really newbie questions and is probably wasting everyone's
time but I can't seem to find any answers anywhere else. Again, thanks in
advance for your answers.
Anthony
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks