-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultiANewArray.j
More file actions
37 lines (31 loc) · 837 Bytes
/
Copy pathMultiANewArray.j
File metadata and controls
37 lines (31 loc) · 837 Bytes
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
27
28
29
30
31
32
33
34
35
36
37
; --- Copyright Jonathan Meyer 1996. All rights reserved. -----------------
; File: jasmin/examples/MultiANewArray.j
; Author: Jonathan Meyer, 10 July 1996
; Purpose: Example of multanewarray instruction
; -------------------------------------------------------------------------
;
; This illustrates how to use multianewarray to allocate
; an array.
;
.class public examples/MultiANewArray
.super java/lang/Object
; standard initializer
.method public <init>()V
aload_0
invokenonvirtual java/lang/Object/<init>()V
return
.end method
.method public static main([Ljava/lang/String;)V
.limit locals 4
.limit stack 2
;
; This allocates an array like:
;
; String s[][] = new String[2][5];
;
iconst_2
iconst_5
multianewarray [[Ljava/lang/String; 2
astore_1
return
.end method