Problem1: Display the value of variable

Display the value of variable

class Demo

{

public static void main(String [ ] args)

{

int a = 10;

System.out.println("a is "+a);

}

}


Output : 10


Note : Anything is coded with string is yet converted into string.


Comments

Popular posts from this blog

Day2 : Compiling Java Program with Examples

Day1: Introduction to Java and its feature

What does System.out.printf( "%-15s%03d\n", s1, x) do?