feat: add L3 inputs

This commit is contained in:
Yadunand Prem
2022-09-08 02:00:01 +08:00
parent a300c1f0b5
commit 681c5de6cf
32 changed files with 619 additions and 0 deletions

34
outputs/QueueTest.out Executable file
View File

@@ -0,0 +1,34 @@
jshell> /open Queue.java
jshell> Integer i;
jshell> String s;
jshell> boolean b;
jshell> Queue<Integer> q = new Queue<Integer>(2);
jshell> b = q.enq(4);
jshell> b
b ==> true
jshell> b = q.enq(8);
jshell> b
b ==> true
jshell> b = q.enq(0);
jshell> b
b ==> false
jshell> s = q.deq();
| Error:
| incompatible types: java.lang.Integer cannot be converted to java.lang.String
| s = q.deq();
| ^-----^
jshell> i = q.deq();
jshell> i
i ==> 4
jshell> i = q.deq();
jshell> i
i ==> 8
jshell> i = q.deq();
jshell> i
i ==> null
jshell> q.enq("hello");
| Error:
| incompatible types: java.lang.String cannot be converted to java.lang.Integer
| q.enq("hello");
| ^-----^
jshell>