The Basics
What is the Java Virtual Machine
Java code is compiled into Java bytecode and ran by the JVM.The JVM can run the bytecode on any machine that supports the JVM. It provides a platform-independent way of executing Java code. No JVM implementation is the same. The JVM is what allows Java ro run on platforms without being recompiled or rewritten.
JRE and JDK adn IDE?
These are tools that allow you to create and run Java programs.
JRE - Java runtime environment, contains JVm and browser plugins for executing java applets. You can run java programs without it. Must be installed to run on your computer. What you need to RUN java programs
JDK - software development kit for java, includes compiles, debuggers and tools to create java programs. JDK need to DEVELOP programs. The JDK contains the JRE, you can just download that run and write.
IDE - Special tool that helps writing code easier. Nice tool iDE is not required to write java software. In order to use an IDE to write the code you must have JDK installed. The ide uses the JDK to write and run your code.
Classes, Instances and Constructors
Almost anything in real life can be represented as code like a chair, a lamp, or a computer. The way we represent these objects in code is as classes. Classes are blueprints for the objects we want to create in code. Classes are used to define both the attributes and function(methods) of the objects it represents.
Define a dog in code.
class Dog
Attributes: breed,
class Dog
breed
age
color
bark