Chapter 1 -getting started Flashcards
ideology of OOP
views a program as consisting of objects that interact with one another by means of actions called methods
objects of the same kind are said to have the same…
type or be in the same class
Applications vs applets
application - regular program is a class that has a method named main when its is run, the run-time system automatically invokes the main method
applet - application meant to be run from a web browserO
Obj used to sending output to screen
System.out
what is println
method or action that the System.out obj performs
=
assignment
==
are these two things in the same memory location?
.equals()
are these things the same
define source code
program written in a high level language - input to the compiler program
object code
translated low level language program
output from the compiler program e.g. Java byte code
what does javac do?
Each class is compiled with the command javac followed by the name of the file in while the class resides. The result is a byte code program whose filename is the sa,e as the class name followed by .class
syntax vs semantics
syntax - like the grammar, semantics - meaning of the things written while following the syntax rules of a language
Syntax error vs run time error vs logic error
syntax - code wont compile
run time - error that isnt detected until the program is run
logic error - mistake in the algorithm for a program
case sensitive
yes
keywords and reserved words
public class void static System String println - predefined in libararies can be changed but dangerous