Print Any Positive Random number for java program
import java.util.Random; public class Program {
public static void main(String[] args) {
Random na = new Random();
System.out.println("Random no:- ");
int a = na.nextInt();
int b = Math.abs(a);
System.out.println(b);
}
}
0 comments:
Post a Comment