We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Introduction
- Java Datatypes
- Discussions
Java Datatypes
Java Datatypes
Sort by
recency
|
1521 Discussions
|
Please Login in order to post a comment
import java.util.Scanner;
public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();
}
instead of passing the hardcoded range, you can use the wrapper class to set the minimum and maximum value for all the conditions.
import java.util.Scanner;
class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt();
}
}
> If You Got Test Case Failed. Only this Solution Is Perfect.