OOP Language Powerpoint

1,017 views

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,017
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

OOP Language Powerpoint

  1. 1. Java Programming Language References: http://docstore.mik.ua/orelly/java-ent/jnut/ch01_02.htm Java For Dummies 4 th Edition by Barry Burd http://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B http://en.wikipedia.org/wiki/Comparison_of_Java_and_C_Sharp http://en.wikipedia.org/wiki/Garbage_collection_(computer_science) http://en.wikipedia.org/wiki/Java_package
  2. 2. <ul><li>public class Greeting { </li></ul><ul><li> public void greet() { </li></ul><ul><li> System.out.println(&quot;hi&quot;); </li></ul><ul><li> } </li></ul><ul><li>} </li></ul>
  3. 3. <ul><li>This is the core value proposition of the Java platform. It is basically writing a code once. After creating a code, you can already run it on anywhere. </li></ul>
  4. 4. <ul><li>Java has a strong security wherein it allows the users to download suspicious codes over a network then runs it in a secured environment. Secured in a sense that it cannot do any harm to the system because Java’s security prevents it from infecting the system with a virus. </li></ul>
  5. 5. <ul><li>Classes are stored in separate files and are only loaded into the Java interpreter when needed. </li></ul><ul><li>These also refers to Java Packages which are compressed as JAR files which allows faster downloading of classes as a group instead of as a file. </li></ul><ul><li>Sample: import java.awt.*; import java.awt.event.*; </li></ul>
  6. 6. <ul><li>Garbage collection is a form of automatic memory management and Java uses it as a means of reclaiming memory instead of deallocation of memory. </li></ul>
  7. 7. <ul><li>public DelaCruzAngeEncoder() throws IOException </li></ul><ul><li>{ </li></ul><ul><li>//bufferedreader in order to read and print file </li></ul><ul><li>//inputstreamreader to locate the input file location </li></ul><ul><li>int ctr = 0; </li></ul><ul><li>BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); </li></ul><ul><li>System.out.print(&quot;Enter file location: &quot;); </li></ul><ul><li>String file = in.readLine(); </li></ul><ul><li>in.close(); </li></ul><ul><li>BufferedReader rdr = new BufferedReader(new FileReader(file)); </li></ul><ul><li>String str; </li></ul><ul><li>while((str = rdr.readLine()) != null) </li></ul><ul><li>{ </li></ul><ul><li>System.out.print(++ctr + &quot;: &quot;); </li></ul><ul><li>for(int i = 0; i < str.length(); i++) </li></ul><ul><li>{ </li></ul><ul><li>if (result(str.toCharArray()[i]) == false) </li></ul><ul><li>{ </li></ul><ul><li>System.out.print(str.toCharArray()[i]); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><li>System.out.print(&quot; &quot;); </li></ul><ul><li>} </li></ul><ul><li>rdr.close(); </li></ul>

×