blob: 21a5836ea88d3b38d783b51b92c877f32176810e (
plain)
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
|
class read_file
{
public static <E> void check(E expect, E result)
{
if(result.equals(expect))
{
System.out.println("Correct:\nOutput expected "+expect+" and got "+result);
}
else
{
System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result);
System.exit(1);
}
}
public static void main(String arg[])
{
String result = "";
Test t = new Test();
try{
result = t.readFile();}
catch(Exception e){
System.out.print(e);
}
check("2", result);
}
}
|