![]() |
| |||||||
| |
![]() |
| | Thread Tools |
|
#1
| ||||
| ||||
| programmers use instead of structures or records? Examples? Thanks? Pascal, C and Ada programers have records and structures, what do Java programmers use instead. Also, do you have to put a class into a package in order to use it or import it into another file/program/application? Examples? I am attempting to learn Java on my own until I get a class this summer. Thanks in advance. FWIW if you answer my questions, you will be the first to do so, that includes www.sun.com and the java website too. |
| |
|
#2
| ||||
| ||||
| I understand what you mean. I'm a C# programmer. Anyway, I hope this link helps you out.http://java.sun.com/docs/books/tutor.../packages.html |
|
#3
| ||||
| ||||
| Classes. When you program in Java you need to declare a classpublic class Test{ public static void main( string Args[] ){ System.out.println("Hello World");}}Then you should save this file with the name Test.javato declare a package you need to use the name package plus the name of the packagepackage myPackageTest; |
|
#4
| ||||
| ||||
| The answer to your first question is that the concept of a structure as in Pascal, C and Ada and other structured programming languages does not actually exist in Java.It is just a series of variables updated in a class or method that generates an output record.Try to think of it as more of a black box. The black box will either have variables to be set of setter methods to set the values of the variables.Once set there will be a write or a pass data-to method that will do the next step. You don't need to know what it does or how it does what it does.OK so you are writing the code but try and design the class structure with this in mind.This way the write method could actually write the data to a file or to a database. The program does not need to know what it does. This means that if the output method changes then the program will not be affected.A package is just a way of seperating out parts of a java program. Look at java classes that are available. these are already in packages that define the type of useage that the classes have ie. java.lang.*You do not have to put your classes into a package. |
|
#5
| ||||
| ||||
| Hi, just a note for you. Berkeley has free videos on java programming. Use "CS 61B Data Structures" in the below link. Awesome, is all I can say. Nice way too learn on your own. Navigate with the drop down list box, once there, to find other semesters. Other courses cover perl, c, and others. webcast.berkeley.edu |
|
![]() |
| Thread Tools | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| programming tips needed (java) | Cew27 | General Software Chat | 10 | 28-01-2008 06:52 PM |
| Java | Cew27 | General Software Chat | 39 | 23-01-2008 05:26 PM |
| Java Question | darksidechaos | Web Browsers & FTP Clients | 7 | 03-10-2007 08:57 AM |
| computer programming solutions to java... | sexyecu | Web Design, Hosting & SEO | 3 | 11-06-2007 10:37 PM |
| Java programming error? | Dr Pratt | Web Design, Hosting & SEO | 1 | 01-04-2007 06:17 PM |
| Powered by vBulletin® Copyright ©2000 - 2008 Jelsoft Enterprises Ltd. SEO by vBSEO ©2008, Crawlability, Inc. |