Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Monday, January 13, 2014

Installing JDK, JRE in Ubuntu

Installation of "default-jdk" using "apt-get" was perfect though in my system it was showing that OpenJdk 6 was installed. I did not wanted it and deleted it from Software Manager. Unfortunately, uninstalling OpenJdk 6 installs OpenJdk 7!!!
I was searching for a solution on the web. Then I found the following link. It describes how to install Oracle Jre and Jdk. This link is so helpful.

http://www.wikihow.com/Install-Oracle-Java-JDK-on-Ubuntu-Linux

Tuesday, February 12, 2013

Step Ahead in JAVA

Hello everyone, this is my solution for "Life, the Universe, and Everyting" in SPOJ. It was my first submission in JAVA. Take here a look.

/*
Task: Life, the Universe, and Everything (SPOJ)
Code: TEST
*/

import java.io.*;   // java input\output library 
import java.util.*; // using for Scanner class

class LifeSPOJ {
    public static void main ( String [] args ) {
        Scanner ss = new Scanner(System.in);
        int num;
        num = ss.nextInt(); // nest intejar
        while( num != 42 ) {
            System.out.println( num ); // printing that number
            num = ss.nextInt();
        }
    }
}
Thanks - Jajabor, 2014