Sunday, May 9, 2010


welcome to all computer students ....


  1. A program to find the prime number easy way....(limited looping)

    step 1:
    select a number
    step 2:
    find the square root for that number...
    step 3:
    find the factors up to that square root number only...
    step 4:
    if any factor found then it is not a prime number other wise it is prime number

    example prog:

    class BykPrime
    public static void main(String byk[]) throws IOException
    int num,potential_diff =2,sqrt_n;
    boolean factor_found=false;
    BufferedReader br = new BufferedReader(new InputStreamReader(;
    System.out.print("Enter Any Number to find it is prime or not.. :");
    num = Integer.parseInt(br.readLine());
    sqrt_n = (int)Math.sqrt(num);
    if(num % potential_diff==0)
    System.out.println("It is not a prime number...");
    System.out.println("The Given number is prime number...");

    ---------------------------- byk

  2. How to speed up our System....

    step 1:
    select run from start menu...
    step 2:
    type "prefetch" with out quotes..
    step 3:
    delete all the files from that folder (using shift+del)
    step 4:
    select step 1
    step 5:
    type "temp" with out quotes...
    step 6:
    delete all the files from that folder (using shift+del)
    step 7:
    select step 1: again
    step 8:
    type "%temp%" with out quotes..
    step 9:
    delete all the files from that folder (using shift+del)
    step 10:
    again select the step 1:
    step 11:
    type "msconfig" without quotes..
    step 12:
    goto startup tab...
    step 13:
    if u dont want any startup programs then disable that programs ... and select apply button
    step 14:
    restart the system...
    step 15:
    Now it is faster then previous ....

    any comments....
    send me .....byk

  3. Finding the saved passwords from any browser using Java Script code...

    step 1:
    first select any email website suppose
    step 2:
    find the email id's by pressing down arrow on the email id text feild
    step 3:
    then you will get the ****** marks in the password field if he is stored his password in the browser...
    step 4:
    first u need to find how many forms in the document by using
    type this in the address bar... with out selecting sign up option....
    step 5:
    then u will get the number of forms in the documents
    eg : 2
    i.e displayed in the alert box...
    step 6:
    then u have to find the which form is having email and password using
    where x=" a number "
    eg : x=1;
    or x=2;
    here x is a number starting from 0 to upto number of forms....
    then u will get the name of the form (if it is having any name)
    eg: EmailAccountinfo
    i.e displyed in the alert box...
    step 7:
    then u have to find the number of elements in the form...
    by using --> "javascript:alert(document.forms[your number].elements.length)"
    type this in the address bar with out using quotes....
    then u will get the number of elements in the form... let say y eg :y= 32
    step 8:
    then find the username and password fields names by using --->
    "javascript:alert(document.forms[x].elements[number's 0 to y].name)"
    type this code in address bar with out using quotes...
    then u will get some fields like pwd,password,emailid, id,....and so on...
    then we have to find the value in that email id ,id ,pwd ,password, fields...
    by using ...>
    "javascript:alert(document.forms[x].elements[number's 0 to y].value)"
    type this with out quotes in the address bar...
    step 10:
    u will get the password of the victim...
    all the best ...
    any comments plz send me .......byk

  4. more than one return statements in function ... in c .......

    in c in the user defined functions we can use more than one return statements but unreachable remaining all except first return statement.....

  5. modify constant value in C :

    int main(void)
    { const int x=10;
    int *p;
    return 0;

  6. SimpleDateFormat class in Java...

    we have to know one thing in SimpleDateFormat class ...

    if u create class like
    new SimpleDateFormat("yyyyMMdd hhmmss");

    then we are able to format AM and PM

    the above constructor won't usefull for the 24 hours format... so we need to give the parameter as shown in below.

    new SimpleDateFormat("yyyyMMdd HHmmss");

  7. How to avoid creating multiple singletons in java.....!!!