Posts

ppt on catch the egg game

Image
https://www.dropbox.com/s/w41pvpidcvxo7cf/Catch%20the%20egg.pptx?dl=0

Reflection Program in java

Source code:: import java.lang.reflect.*; public class Reflection { public static void main(String args[]) { try {      System.out.println("enter the method name"); Class c = Class.forName(args[0]); Method[] m = c.getDeclaredMethods(); for(int i=0;i<=m.length;i++) { System.out.println(m[i]); } System.out.println("enter the name of class"); Constructor[] con = c.getDeclaredConstructors(); for(int i=0;i<con.length;i++) { System.out.println(con[i]); } System.out.println("enter the name of class"); Field[] f = c.getDeclaredFields(); for(int i=0;i<f.length;i++) { System.out.println(f[i]); } } catch(Exception e) { System.out.println(e); } } } // you can able to find the methods ,constructors,and fields of your desirable class. //for more program mail me on - er.gauravsrivastava.cse@gmail.com

BigInteger factorial program

import java.math.*; class BigFactorial     {         static BigInteger factorial(BigInteger n)         {         BigInteger one = new BigInteger("1");         if (n.equals(one))         return one;         return n.multiply(factorial(n.subtract(one)));         }         public static void main(String...s)         {         BigInteger num1,num2,fact,counter;         BigInteger one = new BigInteger("1");         num1 = new BigInteger(s[0]);         num2 = new BigInteger(s[1]);         counter = num1;                 while (!counter.equals(num2.add(one)))             {             fact = factorial(counter);             System.out.println(counter +"!="+fact);             counter=counter.add(one);             }         }     }

Hope

Image

Please don't bargain

Image

Clash of clan

Image