TKP notes for Java
Upcoming SlideShare
Loading in...5
×
 

TKP notes for Java

on

  • 5,490 views

notes for teaching basic Java class

notes for teaching basic Java class

Statistics

Views

Total Views
5,490
Views on SlideShare
1,087
Embed Views
4,403

Actions

Likes
0
Downloads
19
Comments
0

1 Embed 4,403

http://teachingkidsprogramming.org 4403

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    TKP notes for Java TKP notes for Java Presentation Transcript

    • Java notes Language info
    • For Loopsfor (int i = 1; i <= stop; i++){ //do something}
    • Create and Assign Variables String zipcode = “90210”; //the current zipcode is 90210
    • Increment Variablesint age = 38;age += 1;//also can incrementage++;
    • Conditionals - Ifint test = 0;if (test < 0){ //do something}
    • Conditionals – If / Elseint test = 0;if (test < 0){ //do something }else{ //do something else }
    • Create a Methodpublic static void doIt (String s ){ //do something}
    • Use a MethodString s = “hello”; doIt ( s );
    • To view a Value -- GettersGetPenColor ( );GetPenWidth ( );GetSpeed ( );
    • To Change a Value -- Setters SetPenColor (Colors.Reds.Red); SetPenWidth ( 5 ); SetX ( 10 );
    • Arraysint array [ ] = new int [ 1 ];int array [ ] = { “one” };array [ 1 ] = “one”;