Java bytecode: Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile app edit iOS app edit
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 56:
Consider the following Java code:
 
<sourcesyntaxhighlight lang="java">
outer:
for (int i = 2; i < 1000; i++) {
Line 65:
System.out.println (i);
}
</syntaxhighlight>
</source>
 
A Java compiler might translate the Java code above into byte code as follows, assuming the above was put in a method:
<sourcesyntaxhighlight lang="jasmin">
0: iconst_2
1: istore_1
Line 91:
38: iinc 1, 1
41: goto 2
44: return</sourcesyntaxhighlight>
 
== Generation ==