Re: Getting started again
We all learn best in our own way, and myself, I learn best from books. When I re-started programming after being years away from it, I bought a bunch of used books online and plowed through them. Maybe this might work for you, but again, only you know what helps you learn best.
Re: Getting started again
Download Netbeans from http://netbeans.org/downloads/index.html (select the all version).
you can easily generate a java application with File->New Project and select Category Java and Projects Java application. Enter the project name and then select finish.
You can even test Java Applets in Netbeans by right clicking on the file in the project list and select run file.
Look for examples on google and copy and paste them into the application. Remember the file name has to be the same name as the class name. So if you copied and pasted a class that has a different name than the file you'll have to change the file name. To change the file name, right click on the file name (in the project listing) and select refactor->rename.
You can have more than one class in a file, but only one can be public, the rest have to be private. The file name has to be the same name as the public class name.
Have you looked at Trail: Essential Classes: Table of Contents (The Java™ Tutorials)
I found the following website helpful for information related to working with java on the command line: http://www.vipan.com/htdocs/javahelp.html.
Re: Getting started again
Quote:
Originally Posted by
shall
You can have more than one class in a file, but only one can be public, the rest have to be private.
No, they don't have to be private.
db
Re: Getting started again
You can have only one top level public class in a a file, and the filename must correspond to that class name.
You can have nested classes, public or otherwise; you can have inner classes, public or otherwise; and you can have other non-public (default access) top level classes.
The private or protected access doesn't make any sense for a top level class, so is not permitted under the JLS and leads to a compile error.
db
Re: Getting started again
shall, this is exactly for what I was looking. Thanks!