Current Position:Home > Switch statment

Switch statment

Update:11-30Source: network consolidation
Advertisement
hey
is there any way to create dynamic switch statment ?
if not what will be your solution of having something similar ?
thx
Mike

The Best Answer

Advertisement
When people start asking questions about dynamic code flow it usually means that they need some refactoring and/or to use an appropriate collection.
  • Switch statment Update:11-30

    hey is there any way to create dynamic switch statment ? if not what will be your solution of having something similar ? thx MikeWhen people start asking questions about dynamic code flow it usually means that they need some refactoring and/or to use

  • Switch Statments Update:11-30

    I am working on a program to print out a calendar given the month and year. I am trying to use a switch statement for the months. I want to know how I can access the information in the switch statement from a different method. What I don't know. 1. I

  • Switch Statement again Update:10-11

    I am new to Java and am trying to learn how to use and understand the nuances involved in using the Switch statment. Yesterday, I received tremendous help, As a result, I am closer to understanding the switch statement and how it works. My program is

  • Switch Statement Update:10-11

    I am new to Java and am trying to learn how to use and understand the nuances involved in using the Switch statment. I am trying to write an application that will calculate grades for a student. I can use the If Then Else Control structure for this (

  • If statment and semi colon questions Update:11-30

    This morning i was wondering why if(foo); {do stuff} doesn't through a compiler error. If it doesn't through a compiler error then that leads me to believe that it there is a reason to have a ; after an if statment. Any thoughts? I did notice that bo

  • Loop not working for check of duplicate values in a repeating table Update:10-11

    I have a form that is used for marking down problem items, describing the problems and assigning a value to the specified item. In some cases the problems belong to the same class. When they do, the value associated with the problem should only be ma

  • Positioning my objects Update:10-11

    how do you set the positioning of an object in java public class Panel extends JPanel{ public void mymethod (int i){ Graphics paper = this.getGraphics(); paper.setColor(Color.black); Graphics hit = this.getGraphics(); hit.setColor(Color.yellow); swit

  • Runtime Casting Update:10-11

    I have a hashtable with different objects types inside it. Since they are swing objects, all of them are handled by a single function. Enumeration enum = hash.keys(); while( enum.hasMoreElements() )      // The key is always a String, so a hard cast

  • Finding which menu item has been clicked Update:11-30

    Does oracle forms have anyway of knowing which menu item has been clicked. I have a security structure set up where menu items are made visible depending on their name, which in turn is based on the individual forms that a particular user can access.

  • Int to string to string array Update:11-30

    Sorry, if my question is too wordy. First, the problem -- I am reading integers into my application and converting the those into strings using valueOf(). I then need to use those strings in a switch statment. The only way I could figure how to do th