summaryrefslogtreecommitdiff
path: root/yaksh/java_files/read_file.java
diff options
context:
space:
mode:
authormaheshgudi2016-08-03 15:16:08 +0530
committermaheshgudi2016-08-03 15:16:08 +0530
commit40fbb5d8f1d4174f7d7e2d4723e9fbfc40040dcb (patch)
tree7885b674d2deb064137f1f501ed1707bfd54daf8 /yaksh/java_files/read_file.java
parent1b71abc9437d721a41f017db406f312755f5a4c4 (diff)
parent2b03aeb36fa333ea1644a248c742cf0c1df12a5f (diff)
downloadonline_test-40fbb5d8f1d4174f7d7e2d4723e9fbfc40040dcb.tar.gz
online_test-40fbb5d8f1d4174f7d7e2d4723e9fbfc40040dcb.tar.bz2
online_test-40fbb5d8f1d4174f7d7e2d4723e9fbfc40040dcb.zip
rebase changes with stdio evaluator
Diffstat (limited to 'yaksh/java_files/read_file.java')
-rw-r--r--yaksh/java_files/read_file.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/yaksh/java_files/read_file.java b/yaksh/java_files/read_file.java
new file mode 100644
index 0000000..21a5836
--- /dev/null
+++ b/yaksh/java_files/read_file.java
@@ -0,0 +1,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);
+ }
+}