Q:

Java Program to print different values in java

0

Java Program to print different values in java.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import java.util.*;
import java.lang.*;
import java.io.*;

public class Values
{
	public static void main(String args[]) 
	{ 
		int num; 
		float a; 
		char b; 
		String s; 
		num     =       100; 
		a       =       1.234f; 
        b       =       'A'; 
        s       =       "Hello Java"; 

		System.out.println("Value of num: "+num);
		System.out.println("Value of a: "+a);
		System.out.println("Value of b: "+b);
		System.out.println("Value of s: "+s); 
	} 
}
import java.util.*;
import java.lang.*;
import java.io.*;

public class Values
{
	public static void main(String args[]) 
	{ 
		int num; 
		float a; 
		char b; 
		String s; 
		num     =       100; 
		a       =       1.234f; 
                b       =       'A'; 
                s       =       "Hello Java"; 

		System.out.println("Value of num: "+num);
		System.out.println("Value of a: "+a);
		System.out.println("Value of b: "+b);
		System.out.println("Value of s: "+s); 
	} 
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now