@printf "should be: %d\n" 3
./$< tests/Array1 | grep "printstream"
@printf "should be: 0x%08x 0x%08x\n" 0x264 0x8
+ ./$< tests/Integer1 | grep mainresult
+ @printf "should be: 0x%08x\n" 0x1337
%.class: %.java
$(JAVAC) $<
--- /dev/null
+package java.lang;
+
+public class Integer {
+ int value;
+
+ public Integer(int a) {
+ this.value = a;
+ }
+
+ public int intValue() {
+ return this.value;
+ }
+
+ public static Integer valueOf(int a) {
+ return new Integer(a);
+ }
+}
--- /dev/null
+package tests;
+
+public class Integer1 {
+ public static void main(String []args) {
+ Integer a = new Integer(0x1337);
+ a.intValue(); // 0x1337
+ }
+}