Java Foundation 5th Edition Chapter One Section 1 PDF

Title Java Foundation 5th Edition Chapter One Section 1
Course Object Oriented Programming (Formerly Csc2650)
Institution Aurora University
Pages 3
File Size 92.7 KB
File Type PDF
Total Downloads 19
Total Views 142

Summary

Included here are notes to better explain the textbook sections in my own words....


Description

Chapter One Section 1 The Java Programming Language Difference Between Hardware and Software:

HARDWARE: A computer is made up of this. Hardware components are more physical and tangible pieces that support the computing effort. I consider hardware the outside part of the computer like in human examples it is the body, arm, eyes, etc. Examples of this in a computer are: CPU Chips, GPU Units, Wires, Speakers, Keyboards, etc. -

Hardwares are considered useless without any instruction that commands it to do something.

-

Programs are the instructions required. For example there are programs that can adjust the speaker volume or disable it. Also programs are required for the speaker to release sound.

SOFTWARE: A computer is also made up of this and I consider this the most important thing of a computer. The software consists of programs (that can also be known as applications) which are used for the hardware to execute. The software is more of the internal non-physical component of the computer. Think of it that without it a computer will just be blank. For example Windows 11 in a computer is a software since one we can’t touch it and also without it a computer will just be blank without any programs and applications.

BACKGROUND OF JAVA: Programs are written in a Programming Language (A type of language that writes instructions for a computer/computer hardware to follow which defines a set of rules) which is known to define a set of rules that determine how a programmer can be able to combine words and symbols of a specific language into a programming statement which are also instructions that are carried out when the program runs. Compared to other programming languages, Java was created in the early 1990’s and introduced to the public around 1995 or 1996. Java to this day, is known to be an object oriented programming language. This type of language makes objects being important fundamental elements that make up a program. JAVA CODE EXAMPLE: // Sample code example // Destiny 2 Ghost Quote public class Ghost { //----------------------------------------------------------------// Prints a Destiny 2 Game quote. //----------------------------------------------------------------public static void main(String[] args) { System.out.println("A quote by the Ghost from Destiny 2:"); System.out.println("You’re going to see a lot of things that you won’t understand."); } } OUTPUT: A quote by the Ghost From Destiny 2: You’re going to see a lot of things that you won’t understand.

In the program: - The class is called Ghost. The class can be named anything that the programmer wants it to be. - The println method is part of the System.out object. - Inside the class definition is a method which in this program is the main method. Methods are a group of programming statements given by a name. In this case, the Main method is used to start the execution of a program. Also methods have fixed limits by braces {}. - Speaking of braces {}, the braces here allows the program to be more organized by using them for indentation. - The Println (Print Line) is used to display characters in a screen. - Finally ln is used in the program to create a new line to print rather than everything being printed in one line only.

RESERVED WORDS abstract

default

goto*

package

this

assert

do

if

private

throw

boolean

double

implements

protected

throws

break

else

import

public

transient

byte

enum

Instance of

return

true

case

extends

int

short

try

Catch

false

interface

static

void

char

final

long

strictfp

volatile

class

finally

native

super

while

const*

float

new

switch

continue

for

null

synchronized

Reserved words are identifiers (a sequence of one or more characters) that have a special meaning in a programming language and can only be used in some specific ways. These words cannot be used as objects or variables since they are already part of the language and misusing these words can result in errors for the program. In identifiers, uppercase letters and lowercase letters can be used but the difference is important since a lowercase word will be different in the program compared to an uppercase word....


Similar Free PDFs