July 02, 2010

DebugExample in MyEclipse

package edu.stu;

/*F5-- Enter the Method Inside
 * F6-- Step by Step (Step into)
 * F7-- Step Over
 * F8-- Breakpoint to BreakPoint
 *
 * variables changes any values in runtime also a=4 ,but change value in runtime a=8 in "varibales"
 *
 * Expression also we can create at runtime ,there is no method in multiplication ,but i want to check value of mul() in runtime provide "expressions"
 *
 * */
public class DebugExample {
    public static void main(String[] args) {
        int a1 = 4;
        int b = 4;
        System.out.println(".Break Point. F5");
        sum(a1, b);
        System.out.println(".Break Point F5");
        sub(a1, b);
        System.out.println(".Break Point F8");
        System.out.println("Sucess ");
        System.out.println(" Wathc - Expression ");

    }

    public static void sum(int a, int b) {
        System.out.println(".Break Point F6");
        System.out.println("Changes the values in \"variables\"..");
        int add = a + b;
        System.out.println("add  " + add);

    }

    public static void sub(int a, int b) {
        System.out.println(".Break Point F7");
        System.out.println("Add Expressions in view \"Expressions\"..");
        int sub = a - b;
        System.out.println("add  " + sub);

    }

}

No comments:

Post a Comment

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

My Favorite Site's List

#update below script more than 500 posts