how to get runtime value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vinoda2005
    New Member
    • Sep 2006
    • 16

    #1

    how to get runtime value

    Hi frriends,

    here is a small problem.In the following code,how to get the runtime value
    into 'a' here?please help me.

    switch (a) {
    case 1:
    System.out.prin tln("one");
    break;
    case 2:
    System.out.prin tln("two");
    break;
    case 3:
    System.out.prin tln("three");
    break;
    default:
    System.out.prin tln("some other number");
    }
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by vinoda2005
    Hi frriends,

    here is a small problem.In the following code,how to get the runtime value
    into 'a' here?please help me.

    switch (a) {
    case 1:
    System.out.prin tln("one");
    break;
    case 2:
    System.out.prin tln("two");
    break;
    case 3:
    System.out.prin tln("three");
    break;
    default:
    System.out.prin tln("some other number");
    }
    Where is the run time value supposed to come from?
    int a = runtimeValue;
    switch(a) ...

    Comment

    Working...