Ask Me Help Desk

Ask Me Help Desk (
-   Computers for Beginners (
-   -   Java (

  • Oct 9, 2017, 04:38 PM
    On your computer c: drive create a folder called myjava. Save the following code in a file called inside the myjava directory and make changes in that file in the places as given below each commented section. Then save the file.
    Open a command prompt and cd c:\myjava. Then compile by giving the javac command on command prompt.
    Run by giving command java DataWork Make sure no errors and fix if any.
    Save the code in jGRASP, then save it in c:\myjava and run it.

    public class DataWork
    // create 4 variables of different data types
    // Example: private int count;

    public void compare()
    // Use two different comparison operators for each data type declared
    // and print the output for each of those
    // Example: System.out.println(" count > 5:"+(count > 5));

    public static void main (String args [])
    DataWork dw = new DataWork();;

  • All times are GMT -7. The time now is 04:04 AM.