Docsity

Classes Part Two - Introduduction to Jave Programming - Lecture Slides, Slides of Java Programming

Partial preview of the text

Download Classes Part Two - Introduduction to Jave Programming - Lecture Slides and more Slides Java Programming in PDF only on Docsity!

  • Classes part

scope

(See: SillySwap.java) When use primitive (int, double) arguments, the value is copied, not linked to the variable If you use a class (anything with new), the variables will be linked (why? Ch 5.2) (See: ClassSwap.java)

Book's Terminology

I will not be expect perfect terminology usage, but I will explain some of the book's terminology for those who read it Phillips Frearson

Book's Terminology

An argument is the value you pass in to a method and a parameter is the value that will be filled in. Arguments Parameters

When you use a method, this is called invoking the method For example, System.out.println(“hi”) is an invocation of the println() method The way Java only copies primitive (int, double) values is called call-by-value.

Book's Terminology

this is a command for the class object The this command is useful when you need to be explicit about which method or object to access (also when linking) (See: ThisCommand.java)

this