Beginner Guide to Java (NoteBook/ Work In Progess)
(Work in progess Will be updated alot more) Heres a direct link to a google doc file for much easier reading https://drive.google.com/file/d/0B0EoVBfZCR0kT2k0U3VfU0U3V1E/view
Selam its hinok and here’s a java note book I use to study and write down my notes for java I am 15 years old and love to program hopefully you find this note book educational and everything is free to use!!! This little java note book is good for all ages and beginners, and is updated every day if possible if you want to see the latest news for this book (updates etc.) and or contact me then click on the links below: Whirlpool forums: https://forums.whirlpool.net.au/forum-replies.cfm?t=2538014 and reddit: https://www.reddit.com/r/learnjava/comments/4nukbz/java_beginner_note_book_very_basic_and_very_early/ as well as Java programming forums : http://www.javaprogrammingforums.com/cafe/47544-java-beginner-study-note-book-very-basic-im-very-early-into-studying.html
NOTE: THIS IS VERY EARLY IN PROGRESS SO PLEASE CONTACT ME IF YOU HAVE ANY PROBLEMS OR TYPOS
Prologue: Background of computer programming and java
Background of computer programming
In the late 1960s as the computer(1) revolution was ramping up, the need for more complex software/programs(1) was exceeding the capabilities of programmers(1) of the time , one of the main reason for this was the redundancy(1) of previous programming languages(Procedurally)(1) such as FORTRAN because of poor structuring capabilities however in 1972 a programming language some people refer to as the “starting ground of modern programming or the “father” of modern programming was born- the “C” language, it was a form of structured programing, from the late 1970s to the early 1980s the “C” language was the primary language of use, and is still relevant as of today but in less popular fashion, however as programs exceeded the structured limits of the “C “ language a new form of programming language structure was necessary, this new form was Object Oriented Programming (1)or (OOP),this was perfect for the complexity of the programs of the time and used inheritance(1), encapsulation(2), polymorphism(2), this was layered on to the “C++” language that was first launched to the public in 1989. C++ was successful partly because it wasn’t a whole new programming language but rather an enchased version of “C” language with object oriented programming added on. The C++ language was perfect for most of the early 1990’s with the language being capable of complex programs however with the rise of the internet in the mid 1990’s a stage was set for yet another programming language, Java.
What is object oriented programming?
As the name suggests Object Oriented programming is a form of computer programming that organizes itself around objects rather than “actions” and data rather than logic. There are two main parts of object oriented programming a class and object.
Class
The class is the definition, blueprint of your code for example a class can be physical like a human, animal it can also be visual/digital ; textbox , button in addition to invisible things like; date and time basically anything that’s a well-defined idea. Classes define two things attributes and behaviors, an example is a human, humans have attributes and behaviors, and the diagram below is an example of a human’s attributes and behaviors
However it’s not to be mistaken a class does not describe what the name is or how it walks etc.
Object
Objects are fundamentally the “thing” for example as stated above let’s say we have a class called humans this class itself can’t do anything on its own it needs an object the object will inherit the class attributes (1) and behaviors (1) for example let’s say our class is me Hinok, Hinok will inherit the attributes and behaviors of the class human (walking run, name height) and then we can describe its name its height etc. The advantages of this will be explained later!
What is java?
Java is a general purpose objects oriented programming language and computing language it derivers much of its syntax (2) from c and c++ but has fewer low-level facilities. It was released by sun microsystems in 1995.There are lots of applications and websites that use java and therefore won’t work if java isn’t installed, some things that use java are computers, datacenters, game consoles as well as scientific computers, cell phones and the internet(1). Java runs on multiple different OS’s such as Microsoft Windows, Mac OS, Linux, Android etc.…
To access java applications a java installer needs to be installed, however to program with java you would need to have a JDK (1) and a JRE (1) as well as an IDE (1). Each computer that runs java has a JVM (1).
Background of Java
In the early 90’s the idea of extending the power of network computers/computing to the activities of everyday life was a radical vision. In 1991 a group of sun engineers nicknamed “The Green Team” believed the next wave in computing would be the union of digital consumer devices and computers. Led by James gosling, the team worked around the clock and created the programming language that would revolutionize our world-java.
The green team demonstrated their new language with an interactive hand held home entertainment controller that was targeted at the digital cable television industry, however this was unsuccessful concept because of its complexity – it was much to advance for its time although the programming concept was just right for the internet. In 1995 Netscape Navigator Internet browser announced that they would incorporate java technology.
Advantages of Java
The internet helped catapult java to the forefront of programming and java in turn had a profound effect on the internet. Java simplified web browsing by innovating a network program called the applet that improved the internet largely while still preserving security as well as portability. An applet was a special kind of java program that could be transmitted over the internet and be executed automatically without user approval or recognition which allowed websites to move some of its functionality to a server while preserving security by not allowing applets to access anything but the java execution environment in addition to having portability – working on all computers and operating systems.
How Java works
Java uses bytecode, bytecode is a highly optimized set of instructions designed to be executed by the java run-time environment (Java Virtual machine-JVM), translating java programs to bytecode makes it much easier to use in other environments such as different OS’s.
Basic definitions prologue (1st definition page):
Computer: A computer is a device that accepts information (which is in the form of digital data) and manipulates it for some result based on a program or sequence of instructions on how the data is to be processed.
Redundancy: redundancy is when something is not useful anymore- no longer needed.
Program: A program is a collection of instructions that performs a certain task when executed by a computer. Programs and software are similar but not the same, Software is broad term that includes Program, data structure documentation that is generated during life cycle of software development and installation files which are used to perform a computing task.
Procedural programming: Procedural programming is a form of programming which was widely used in the 1960’s it used procedural steps to organize codes hence its name. Examples of some programming languages that use procedural programming are the C language and FORTAN.
Object Oriented Programming: As the name suggests Object Oriented programming is a form of computer programming that organizes itself around objects rather than “actions” and data rather than logic. There are two main parts of object oriented programming a class and object. For further information checkout this websites
Class: The class is the definition, blueprint of your code for example a class can be physical like a human, animal it can also be visual/digital ; textbox , button in addition to invisible things like; date and time basically anything that’s a well-defined idea. Classes define two things attributes and behaviors, an example is a human, humans have attributes and behaviors, and the diagram below is an example of a human’s attributes and behaviors.
However it’s not to be mistaken a class does not describe what the name is or how it walks etc.
Object: Objects are fundamentally the “thing” for example as stated above let’s say we have a class called humans this class itself can’t do anything on its own it needs an object the object will inherit the class attributes and behaviors for example let’s say our class is me Hinok, Hinok will inherit the attributes and behaviors of the class human (walking run, name height) and then we can describe its name its height etc. The advantages of this will be explained later!
Attributes: Attributes are essentially the “characteristics” of the class, for example the attributes for a car can be the engine or headlights and the shape.
Behavior: Behaviors are generally as the name suggests the actions “what the class can do” for example for a car; a car can accelerate or break.
Software: Software is an organized collection of computer data and instructions, Examples of software are; Internet explorer, Movie maker, Adobe Photoshop.
Programmer: A programmer is a person who writes programs.
OS: An OS or operating system is the most important program in the computer it performs basic tasks such as input from the keyboard, sending output to the display screen, keeping track of files and directories on the disk, and controlling peripheral devices such as disk drives and printers. Every general-purpose computer must have an operating system to run other programs and applications .Examples of OS’s are Windows, Mac OS, Linux, Ubuntu.
Programming language: Programming language is a coding language that a programming can use to write instructions that a computer can understand and therefore do what the programmer or the computer user wants.
Internet: The internet is the global system of computer that uses the Internet protocol suite (TCP/IP) to link billions of devices worldwide.
Internet browser: The internet browser is a piece of digital software that can be used to retrieve, present and traversing information through the World Wide Web.