Sunday 22 September 2013

Multiplication of two numbers.

PROGRAM CODING:

class Multiplication
{
public static void main(String args[])
{
int a=Integer.parseInt(args[0]);
int b=Integer.parseInt(args[1]);
int c;
c=a*b;
System.out.println("The Multiplication of two value is"+c);
}
}

OUTPUT:

C:\Program Files (x86)\Java\jdk1.7.0_25\bin\Lokey>javac Multiplication.java
C:\Program Files (x86)\Java\jdk1.7.0_25\bin\Lokey>jfava Multiplication 10 6
The Multiplication of two value is 60

Difference between two numbers

PROGRAM CODING:

class Subtraction
{
public static void main(String args[])
{
int a=Integer.parseInt(args[0]);
int b=Integer.parseInt(args[1]);
int c;
c=a-b;
System.out.println("The Difference between two value is"+c);
}
}

OUTPUT:

C:\Program Files (x86)\Java\jdk1.7.0_25\bin\Lokey>javac Subtraction.java
C:\Program Files (x86)\Java\jdk1.7.0_25\bin\Lokey>java Subtraction 10 8
The Difference between two value is 2

Addition of two numbers


PROGRAM CODING:

class Addition
{
public static void main(String args[])
{
int a=Integer.parseInt(args[0]);
int b=Integer.parseInt(args[1]);
int c;
c=a+b;
System.out.println("The addition of two value is"+c);
}
}

OUTPUT:


C:\Program Files (x86)\Java\jdk1.7.0_25\bin\Lokey>javac Addition.java
C:\Program Files (x86)\Java\jdk1.7.0_25\bin\Lokey>java Addition 5 6
The addition of two value is 11.

Wednesday 11 September 2013


Introduction to Java

Paradigm(s)            multi-paradigmobject-orientedstructured,imperative,                                                        generic,reflective

Appeared in            1995

Designed by            James Gosling and Sun Microsystems

Developer                Oracle Corporation

Stable release        Java Standard Edition 7 Update 40 (1.7.40)

Major
implementations   OpenJDK, many others

Dialects                    Generic Java,Pizza

Implementation
language                  C and C++

OS                             Multi-platform

filename
extensions              .java, .class, .jar

Website                    For Java Developers

Tuesday 10 September 2013

how to find the IP Address of your system

From the program given bellow you can able to find the IP Address of your system..Check this out...


Program coding:


import java.net.InetAddress;

class IPAddress
{
   public static void main(String args[]) throws Exception
   {
      System.out.println(InetAddress.getLocalHost());
   }
}

Output:

122.164.255.215