








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
In the course of the Introduction to Jave Programming, we study the basic syntax and the basic program in java. In these lecture slides the key points are:Branching, Highlights, Switches, Statements, Boolean, True or False, Boolean Expressions, Greater, Condition is True, Need Parenthesis
Typology: Slides
1 / 14
This page cannot be seen from the preview
Don't miss anything!









Midterm week? (Ours is Oct 19.) Lab progress? (Homework due on Monday)
We have been using System.out.println() method since the second class In addition to using predefined methods (println() and Math.pow()) you can create your own. Useful if you are doing similar commands (if you copy and paste multiple lines of code)
Can think of methods as packaging multiple commands into one
(See: AddMethod.java) (See: NumberToDouble2.java) return type heading body return statement
Classes are simply a way of organizing data (See: Lab2Part2Class.java) Docsity.com
Every time you do not make a primitive type (int, double, boolean, etc.) or String, you must use new command Basic format (syntax): [class] [identifier] = new class; Example: Partner p1 = new Partner(); Scanner in = new Scanner(System.in); Docsity.com
Classes make code much easier to modify in addition to organize Learning how to write code is practice, this will become natural if you do it a lot Writing code that can easily be added to is much more difficult
Can put a class inside another class (Ch 4.4)