Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Java Course Day 3

695 views

Published on

Published in: Education
  • Be the first to comment

  • Be the first to like this

Java Course Day 3

  1. 1. Day 3<br />
  2. 2. static<br />
  3. 3. null reference <br />
  4. 4. Java Arrays<br />
  5. 5. Type[] arrayName = new Type[elements count];<br />
  6. 6. int[] array1 = new int[10];<br />String[] array1 = new String[10];<br />Object[] array1 = new Object[10];<br />MyType[] array1 = new MyType[10];<br />
  7. 7. String[] colors = new String[] {“red”, “blue”, “white”};<br />
  8. 8. How To Access Elements?<br />
  9. 9. String[] friends = new String[10];<br />friends[0] = “Oleg”;<br />friends[1] = “Alex”;<br />friends[3] = “Irina”;<br />System.out.println(friends[1]);<br />System.out.println(friends[3]);<br />
  10. 10. Multidimensional arrays<br />
  11. 11. Type[][] arrayName = new Type[rows count][columns count];<br />
  12. 12. Java Loops<br />
  13. 13. while (condition) {<br /> ….<br />} <br />
  14. 14. do {<br /> ….<br />} while (condition);<br />
  15. 15. for (counter; condition; increment) {<br /> ….<br />} <br />
  16. 16. Goals<br />
  17. 17. Packages<br />
  18. 18. Access Levels<br />(Private, Protected, Public, default)<br />
  19. 19. Private – this class only<br />
  20. 20. Protected – this class and children<br />
  21. 21. Public – no limits<br />
  22. 22. default – package private<br />
  23. 23. Encapsulation<br />
  24. 24. final<br />
  25. 25. Interfaces<br />
  26. 26. Class casting<br />
  27. 27. Never, Never, Never, Never Give Up!<br />

×