Your SlideShare is downloading. ×
TKP notes for Java
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

TKP notes for Java

6,266
views

Published on

notes for teaching basic Java class

notes for teaching basic Java class

Published in: Technology, News & Politics

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,266
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
22
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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