![]() |
public class variables2 |
![]() |
{ |
![]() |
public static void main(String[] args) |
![]() |
{ |
![]() |
int i = 2; |
![]() |
String sentence = "I am a camera."; |
![]() |
double a = 2.0, b = 3.0; |
![]() |
int i = 2 * 3 + 5; |
| You can initialize a variable with a result of an expression. Here integer variable 'i' receives an initial value 11. | |
![]() |
} |
![]() |
} |