Menu bar

Wednesday, October 8, 2014

Assignment 2

Assignment 2

  • Explain package in java with example.
  • Discuss different components of java.util package.
  • Explain interface in java with example.
  • Explain difference between interface and abstract class with example.
  • What do you mean by exception handling? explain different types of exception.
  • Explain try, catch, finally, throw and throws with example.
  • What do you mean by multithreading? Explain thread life cycle.
  • Explain thread synchronization with example.
  • Explain collections framework in java.
  • Difference between text I/O vs binary I/O.
* Assignment must be submitted on or before 11/10/2014.
* Those who have below 10 marks in Class Test 1 have to write the paper twice and submit before 11/10/2014.
* Material and ppt has been updated on the blog click here to view

Monday, September 8, 2014

Assignment 1

    Assignment 1

  • List and explain various features of java.
  • Explain JVM?
  • Difference between JAVA and C++.
  • List OOP characteristics and describe inheritance with examples.
  • Explain the words super, static, final and this with the help of example.
  • Explain constructor and finalizer with the help of example.
  • Compare String with StringBuffer. Also write a program to count occurrence of character in a string.
  • Explain Overloading and Overriding with example
  • What is Inheritance? Explain the different forms of Inheritance with example..
  • Explain Java garbage collection mechanism.

* Assignment must be submitted on or before 05/09/2014. It should be written in tutorial pages only.
* Those who have below 20 marks in Class Test 1 have to write the paper twice and submit before 05/09/2014.

Monday, July 14, 2014

How to install JAVA

Steps

  1. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    1
    Download the latest version of the *Java JDK from Sun Microsystems.
  2. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    2
    Double-click on the install file and it should open an installer (Fig. 1).
  3. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    3
    Click next, then read and accept the license.
  4. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    4
    On the next screen you will encounter some options. Just leave these alone and click next unless you know what you are doing. (Because this is being read it is assumed that you do not.)(Fig. 2)
  5. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    5
    The next page you encounter should install (and in some cases download) the Java Development Kit. (Fig. 3)
  6. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    6
    After the installer is finished, open run by clicking Start > Run... or by typing Windows Key + R.
  7. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    7
    In the text box, type "cmd" and click "OK".
  8. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    8
    A simple window should be opened with a black background and a text prompt. This is called the "Command Prompt." My command prompt background is red, but it could really be any color. (Fig. 4)
  9. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    9
    After focusing the window, type "javac" and press enter. If the prompt returns something along the lines of: "'javac' is not recognized as an internal or external command, operable program or batch file" then continue with the next step. If it shows many more options and lines, skip to step 15.
  10. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    10
    Open the properties of "My Computer" by either right-clicking the icon on the desktop or right-clicking Start > My Computer. When the pop up menu opens, scroll to the bottom and select "Properties".
  11. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    11
    This should open a window named "System Properties". Click on the "Advanced" tab.
  12. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    12
    Click "Environment Variables". (Fig. 5)
  13. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    13
    Next, another window opens with a lot of confusing sentences and letters.Double-click on the "Path" variable on either of the option boxes. It is recommended to edit the variable in the box "User variables for (your username)".
  14. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    14
    Once the variable is opened, a text box in yet another window appears.Careful not to delete anything in this box. At the end of the text box, add a semi-colon if there is not one already, and add "C:\Program Files\Java\jdk1.6.0\bin" to the text box. This is assuming you did not change the file path of the installation.
  15. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    15
    Click "Apply" and "OK" to all the windows you have just opened. Open the command prompt again, while following steps 6-9 to see if that "javac" command works.
  16. spaceplay / pause
     
    escstop
     
    ffullscreen
    shift + slower / faster (latest Chrome and Safari)
    volume
     
    mmute
    seek
     
     . seek to previous
    126 seek to 10%, 20%, …60%
    16
    Congratulations! You have taken your first step to starting Java programming.