-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCLS_Commandline.java
More file actions
32 lines (24 loc) · 957 Bytes
/
CLS_Commandline.java
File metadata and controls
32 lines (24 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import java.io.*;
public class CLS_Commandline
{
public static void main(String args[])throws IOException, InterruptedException{
int l;
System.out.print("Enter An Awesome Number!:");
BufferedReader as=new BufferedReader(new InputStreamReader(System.in));
int n=Integer.valueOf(as.readLine());
l=String.valueOf(n).length();
System.out.println("The Length of the Number:"+l);
System.out.print("Enter 1:");
n=Integer.valueOf(as.readLine());
if(n==1)
new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor();
System.out.print("Enter Second Awesome Number!:");
n=Integer.valueOf(as.readLine());
if(n==1)
System.out.println("The Length of the Number:"+l);
else
System.out.print('\u000C');
String s="Examination";
System.out.println(s.startsWith(s.substring(5))+" "+(s.charAt(2)==s.charAt(6)));
}
}