спасти мать-природа.

мы не нужны деньги. мы просто с просьбой помочь

Сохранить Землю. Просто быть частью понимания. Прогулка больше, делать менее использование автомобиля. Хотя, как это только увидеть и попробовать все возможное,

See Here, we are not asking for money.

пожалуйста, сохраните прекрасную землю пожалуйста, нажмите здесь(please Help Us)

Thursday, 25 July 2013

Printer

Monday, 8 July 2013

DataTypes In java Example


     
    class DataTypes
    {
        public static void main(String args[])
        {
            System.out.println(" Data Types");
            System.out.println("Class  DataType Size(Bytes)  MinValue \tMaxValue   Bits");
            //System.out.println("Integer int      "+(Integer.SIZE/4)+" "+Integer.MIN_VALUE+" "+Integer.MAX_VALUE+" "+Integer.SIZE);
            System.out.println("Integer     int    "+(Integer.SIZE/4)+"  \t"+Integer.MIN_VALUE+" "+Integer.MAX_VALUE+" "+Integer.SIZE);
            System.out.println("Short       short  "+(Short.SIZE/4)+  "  \t"+Short.MIN_VALUE+"   "+Short.MAX_VALUE+"   "+Short.SIZE);
            System.out.println("Long        long   "+(Long.SIZE/4)+  "   \t"+Long.MIN_VALUE+"    "+Long.MAX_VALUE+"   "+Long.SIZE);
            System.out.println("Float       float  "+(Float.SIZE/4)+  "  \t"+Float.MIN_VALUE+"   "+Float.MAX_VALUE+"   "+Float.SIZE);
            System.out.println("Double      double "+(Double.SIZE/4)+  " \t"+Double.MIN_VALUE+"  "+Double.MAX_VALUE+"   "+Double.SIZE);
            System.out.println("Character   char   "+(Character.SIZE/4)+"\t"+Character.MIN_VALUE+"   "+Character.MAX_VALUE+"   "+Character.SIZE); 
      }
    }

Recursion Factorial Demo Example Java


     
    class RecursionFactorial
    {
        static int fact=0;
        public static void main(String []args)
        {
            int no;
            no=Integer.parseInt(args[0]);
            if(no<=0)
                return;
             no=--no;
            fact+=no * main(Integer.toString(no));       
            System.out.println(fact);   
        }
    } 

Command Line Example Java


   
        class CommandLineEx
        {
            public static void main(String args[])
            {
                int n=Integer.parseInt(args[0]);

                for(int i=0;i<=n;i++)
                {
                    for(int j=0;j

String Palindrome java Example


    
         import java.io.*;

         class StringPalindrome
          {
            public static void main(String args[])
            {

                int length=args[0].length();
                boolean flag=false;

                for(int i=0;i

Prime Number Demo Java Example


    
       import java.io.*;
        class PrimeNumber
        {
            public static void main(String args[])
            {
                int flag=0;

                for(int i=2;i<=20;i++)
                {
                    flag=0;
                    for(int j=2;j

Saturday, 6 July 2013

String Replace Demo java


    import java.io.*;
    import java.util.*;

    class StringReplace
    {
        public static void main(String args[])
        {
            Scanner sr=new Scanner(System.in);

            sr.nextLine();
            System.out.println(sr);      
        }
    }
    

Armstrong Program

    class Armstrong
    {
        public static void main(String args[])
        {
            int arm=153;
            int no=0;
            int n;       
            int temp=arm;

            while(arm>=0)
            {
                n=arm%10;
                no=no+(n*n*n);
                arm=arm/10;                       
            }
            System.out.println(no);
            if(temp==no)
                System.out.println(temp+" is an armstrong number");   
            else
                System.out.println(temp+" is not an armstrong number");
        }
    

Random Number java programm

    class random_r
    {
        public static void main(String[] args) 
        {      
            for (int i = 0; i < 12; i++)
            {  
                System.out.println(Math.random());        
                System.out.println((Math.random())*100);        
                System.out.println((int) ((Math.random())*100));
            }
        }
    }
    }