What is it? Back in 2008 right after Lehman Brothers went Bankrupt, I created this programming guide to help out some co-workers that were programmers but not Java programmers, learn Java to help with potential job searches. Just came across it in a backup and thought might be useful to post.
Links to the Guide hosted on RogueLogic.com:
- The Non-Java Programmers Guide to Java (PDF)
- Lessons Directory for the "The Non-Java Programmers Guide to Java"
- Full Guide with lessons and support files (ZIP) of the "The Non-Java Programmers Guide to Java"
The intended audience for this guide on the Java Programming Language is Experienced Programmers that want a quick concise read to get them started with the Java Programming Language. This guide does NOT assume you have any knowledge of Java or Object Oriented Programming.
At the end of this guide you should be able start reading and modifying other peoples code, as well as start creating your own programs in Java from scratch. What this guide will NOT do is make you an expert with Java. You should read other documentation and books on Java and practice programming in Java, and perhaps even take a training course or two, if you want to be come a “senior” Java developer.
It is the author’s opinion that, the only real way to become a highly productive programmer in any language including Java is to work with it on a frequent basis either at your job (as a professional programmer already, who wants to move to the Java language to participate in Java development projects within your company), or for programming projects at school and at home.
Lesson 1 – My First Java Program
- The simplest Java Program. Outputs to the screen “Hello World”
- How to write a Java Program
- Compile a program from the command line
- Run a program from the command line
- What is the classpath?
- What is a Package?
- Environmental Settings for Java
- Same on Windows or Unix/Linux: JAVA_HOME, PATH, CLASSPATH
- What is a JAR File?
Lesson 2 – Procedural Programming in Java?
This shows you that you can actually just create a single Java class with “functions”
You should never program in the real world like this.
Lesson 3 – Classes and Objects
- Basic Object Oriented Programming (OOP) Guide
- What is OOP?
- What is a Class?
- What is an Object?
- What’s the difference between a class and an object?
- Java Class verses Java Interface
Lesson 4 – Built In Java Data Types
- Two Types of Data Types in Java: Primitives and Objects
- What’s the difference?
- Primitive Types: int, float, double, char, long, byte, boolean, short
- Included Object Data Types: String, Date
- Primitive Wrapper Objects: Integer, Float, Double, Character, Long, Byte, Boolean, Short
- In some cases you need to pass around a variable such as an int as an object. In this case you would use Wrapper Types.
- For “MOST” Java programs you can usually ignore wrapper types, unless you want to store a primitive in a Collection (See the Lesson on Collections for details).
- Notices there’s one for each Primitive Type, only difference in most cases which for Character are the same name as the primitive, only with a Capital Letter as the first letter. In Java, everything is CASE-SENSITIVE.
- Wrapper Types are used to “wrap” a primitive in an Object. Example If you want to wrap an would wrap an “int” variable in an Integer object.
- Type Casting
Lesson 5 – Operators, Loops and Logic Statements (Control Statements)
Lesson 6 – Collections
- Lists: ArrayList / Vector
- Maps: HashMap / HashTable
Lesson 7 – Exceptions
Lesson 8 – JDBC (Java Database Connectivity)
- How do we connect to a database in Java?
- Basic JDBC Programming from a Command Line Java Program.
Just another stream of Random Bits…
-Robert C. Ilardi