• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.class public LMain;
2.super Ljava/lang/Object;
3
4#expected output:
5#returning a string
6#42
7
8.method public constructor <init>()V
9    .registers 1
10    invoke-direct {p0}, Ljava/lang/Object;-><init>()V
11    return-void
12.end method
13
14.method public static main([Ljava/lang/String;)V
15    .registers 4
16
17    sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
18
19    new-instance v1, LMain;
20    invoke-direct {v1}, LMain;-><init>()V
21    invoke-virtual {v1}, LMain;->overloadTest()Ljava/lang/String;
22    move-result-object v2
23
24    invoke-virtual {v0, v2}, Ljava/io/PrintStream;->println(Ljava/lang/Object;)V
25
26    invoke-virtual {v1}, LMain;->overloadTest()I
27    move-result v2
28
29    invoke-static {v2}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
30    move-result-object v2
31
32    invoke-virtual {v0, v2}, Ljava/io/PrintStream;->println(Ljava/lang/Object;)V
33
34    return-void
35.end method
36
37
38.method public overloadTest()Ljava/lang/String;
39    .registers 1
40
41    const-string v0, "returning a string"
42    return-object v0
43.end method
44
45.method public overloadTest()I
46    .registers 1
47
48    const v0, 42
49    return v0
50.end method