Java Tutorial for Students Entering CS1302 Who Learned C++ in CS1301

Guide for students CS1302. Who taught C++ in CS1301. By Pat Roth (copyright). Introduction -> There are many similarities between ….

More PDF Content

Java Tutorial for Students Entering Who Learned C++ in CS1301

  • Introduction –> There are a lot of similarities between C++ and Java but the full object-oriented approach of Java and its huge number of provided classes make it significantly different from C++, especially for the beginning student. This tutorial will try to review the highlights of CS1301 as taught in Java.
  • Background –> a C++ program is translated into the machine language version of the computer environment it is on (Windows PC, UNIX workstation, Macintosh, etc.) and then the object code is executed in that computer environment. Java programs are translated into a standard machine language, called Bytecode, and then a JVM (Java Virtual Machine) reads and translates the Bytecode into the machine language of the running computer….
  • Object-Oriented Approach -> every Java program consists of at least one class with possible data types and associated methods. Most operations will be methods called by objects, as in mydate.print(). There is no encouragement to write stand alone functions, such as print(mydate). …
  • Naming Program Elements -> same rules as in C++, except you may use a letter, underscore or dollar sign to start a name and the rest of the name can contain numbers, letters, underscore or dollar sign. You really should not use the dollar sign since it has special meaning in some Java systems and you should not begin a name with an underscore, since it also has a special meaning in some systems….
  • Screen Output -> Java provides an object that represents an output device, which is, by default, the screen. The name of the object is System.out and it has two methods, print and println (skips to a new line after printing). No special libraries need to be included to use this object. All output to the screen is considered String data type so the concatenation symbol (+) is used to join items to be printed. For
Download Java Tutorial for Students Entering CS1302 Who Learned C++ in CS1301 pdf from cse.spsu.edu, 9 pages, 32.06KB.
Related Books

Leave a Reply