i don't know how to assign them dinamically. Even i don't want to initialize variable during declaration. I want to initialize them during in between the program . How to do it.
for ex:-
public class{
int a;
Public static void main(String [] args){
a=10; // i don't want to do like this . It should ask user input to enter values.So that user can enter what ever value they want.
}
}
http://stackoverflow.com/questions/5287538/how-can-i-get-the-user-input-in-java
[code:20u5j5e1]Scanner reader = new Scanner(System.in); // Reading from System.in
System.out.println("Enter a number: ");
int n = reader.nextInt(); // Scans the next token of the input as an int.
[/code:20u5j5e1]