Java allows variables to be initialized dynamically.
public class Main {
public static void main(String args[]) {
// c is dynamically initialized
double c = Math.sqrt(2 * 2);
System.out.println("c is " + c);
}
}
The output from the code above is
c is 2.0
| w_w___w__.j_a__va__2__s__.c___om___ | Contact Us |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |