+ 1

how to print an integer value.?

18th Sep 2016, 1:51 AM
Saurabh S Naik
Saurabh  S Naik - avatar
2 Respostas
+ 2
int i=1; System.out.println(i); or String s=String.valueOf(i); System.out.println(s);
18th Sep 2016, 2:05 AM
Ahmad Samy
Ahmad Samy - avatar
+ 1
public class numb(){ public static void main(string args[]){ scanner input = new scanner(system.in); int x = input.nextint(); system.out.print (x); //remember you have to import scanner before the class
18th Sep 2016, 9:34 PM
jerry
jerry - avatar