/ Sams Teach Yourself C in 21 Days (6th Edition)
/ STYC216E.ISO / mac / Examples / Day26 / OverloadDemo.java ![]() | < prev | next > |
MacBinary | 2002-05-26 | 1.4 KB | [TEXT/LMAN] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, Sun May 26 00:36:08 2002, modified Sun May 26 00:36:08 2002, creator 'LMAN', type ASCII, 839 bytes "OverloadDemo.java" , at 0x3c7 286 bytes resource | default (weak) | |
99% | file | data | default | |
74% | TrID | Macintosh plain text (MacBinary) | default | |
25% | TrID | MacBinary 2 | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [LMAN] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 4f 76 65 72 6c 6f | 61 64 44 65 6d 6f 2e 6a |..Overlo|adDemo.j|
|00000010| 61 76 61 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ava.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4c 4d 41 | 4e 00 00 ff ff ff ff 00 |.TEXTLMA|N.......|
|00000050| 00 00 00 00 00 03 47 00 | 00 01 1e b9 16 16 b8 b9 |......G.|........|
|00000060| 16 16 b8 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 c8 3b 00 00 |........|.....;..|
|00000080| 69 6d 70 6f 72 74 20 6a | 61 76 61 2e 6c 61 6e 67 |import j|ava.lang|
|00000090| 2e 53 74 72 69 6e 67 3b | 0d 0a 69 6d 70 6f 72 74 |.String;|..import|
|000000a0| 20 6a 61 76 61 2e 6c 61 | 6e 67 2e 44 6f 75 62 6c | java.la|ng.Doubl|
|000000b0| 65 3b 0d 0a 0d 0a 70 75 | 62 6c 69 63 20 63 6c 61 |e;....pu|blic cla|
|000000c0| 73 73 20 4f 76 65 72 6c | 6f 61 64 44 65 6d 6f 20 |ss Overl|oadDemo |
|000000d0| 0d 0a 7b 0d 0a 20 20 20 | 70 75 62 6c 69 63 20 73 |..{.. |public s|
|000000e0| 74 61 74 69 63 20 76 6f | 69 64 20 6d 61 69 6e 28 |tatic vo|id main(|
|000000f0| 53 74 72 69 6e 67 20 61 | 72 67 73 5b 5d 29 20 0d |String a|rgs[]) .|
|00000100| 0a 20 20 20 7b 0d 0a 20 | 20 20 20 20 20 4f 76 65 |. {.. | Ove|
|00000110| 72 6c 6f 61 64 65 64 20 | 4d 79 43 6c 61 73 73 3b |rloaded |MyClass;|
|00000120| 0d 0a 20 20 20 20 20 20 | 64 6f 75 62 6c 65 20 64 |.. |double d|
|00000130| 3b 0d 0a 0d 0a 20 20 20 | 20 20 20 4d 79 43 6c 61 |;.... | MyCla|
|00000140| 73 73 20 3d 20 6e 65 77 | 20 4f 76 65 72 6c 6f 61 |ss = new| Overloa|
|00000150| 64 65 64 28 29 3b 0d 0a | 20 20 20 20 20 20 53 79 |ded();..| Sy|
|00000160| 73 74 65 6d 2e 6f 75 74 | 2e 70 72 69 6e 74 6c 6e |stem.out|.println|
|00000170| 28 22 41 64 64 69 6e 67 | 20 74 77 6f 20 6e 75 6d |("Adding| two num|
|00000180| 62 65 72 73 3a 20 22 29 | 3b 0d 0a 20 20 20 20 20 |bers: ")|;.. |
|00000190| 20 53 79 73 74 65 6d 2e | 6f 75 74 2e 70 72 69 6e | System.|out.prin|
|000001a0| 74 28 22 20 20 54 68 65 | 20 73 75 6d 20 6f 66 20 |t(" The| sum of |
|000001b0| 31 2e 34 20 61 6e 64 20 | 36 2e 37 20 69 73 20 22 |1.4 and |6.7 is "|
|000001c0| 29 3b 0d 0a 20 20 20 20 | 20 20 64 20 3d 20 4d 79 |);.. | d = My|
|000001d0| 43 6c 61 73 73 2e 73 75 | 6d 4f 66 28 31 2e 34 2c |Class.su|mOf(1.4,|
|000001e0| 20 36 2e 37 29 3b 0d 0a | 20 20 20 20 20 20 53 79 | 6.7);..| Sy|
|000001f0| 73 74 65 6d 2e 6f 75 74 | 2e 70 72 69 6e 74 6c 6e |stem.out|.println|
|00000200| 28 44 6f 75 62 6c 65 2e | 74 6f 53 74 72 69 6e 67 |(Double.|toString|
|00000210| 28 64 29 29 3b 0d 0a 20 | 20 20 20 20 20 53 79 73 |(d));.. | Sys|
|00000220| 74 65 6d 2e 6f 75 74 2e | 70 72 69 6e 74 6c 6e 28 |tem.out.|println(|
|00000230| 22 41 64 64 69 6e 67 20 | 74 68 72 65 65 20 6e 75 |"Adding |three nu|
|00000240| 6d 62 65 72 73 3a 20 22 | 29 3b 0d 0a 20 20 20 20 |mbers: "|);.. |
|00000250| 20 20 53 79 73 74 65 6d | 2e 6f 75 74 2e 70 72 69 | System|.out.pri|
|00000260| 6e 74 28 22 20 20 54 68 | 65 20 73 75 6d 20 6f 66 |nt(" Th|e sum of|
|00000270| 20 31 2e 34 2c 20 36 2e | 37 2c 20 61 6e 64 20 31 | 1.4, 6.|7, and 1|
|00000280| 32 2e 32 20 69 73 20 22 | 29 3b 0d 0a 20 20 20 20 |2.2 is "|);.. |
|00000290| 20 20 64 20 3d 20 4d 79 | 43 6c 61 73 73 2e 73 75 | d = My|Class.su|
|000002a0| 6d 4f 66 28 31 2e 34 2c | 20 36 2e 37 2c 20 31 32 |mOf(1.4,| 6.7, 12|
|000002b0| 2e 32 29 3b 0d 0a 20 20 | 20 20 20 20 53 79 73 74 |.2);.. | Syst|
|000002c0| 65 6d 2e 6f 75 74 2e 70 | 72 69 6e 74 6c 6e 28 44 |em.out.p|rintln(D|
|000002d0| 6f 75 62 6c 65 2e 74 6f | 53 74 72 69 6e 67 28 64 |ouble.to|String(d|
|000002e0| 29 29 3b 0d 0a 20 20 20 | 20 20 20 53 79 73 74 65 |));.. | Syste|
|000002f0| 6d 2e 6f 75 74 2e 70 72 | 69 6e 74 6c 6e 28 22 41 |m.out.pr|intln("A|
|00000300| 64 64 69 6e 67 20 66 6f | 75 72 20 6e 75 6d 62 65 |dding fo|ur numbe|
|00000310| 72 73 3a 20 22 29 3b 0d | 0a 20 20 20 20 20 20 53 |rs: ");.|. S|
|00000320| 79 73 74 65 6d 2e 6f 75 | 74 2e 70 72 69 6e 74 28 |ystem.ou|t.print(|
|00000330| 22 20 20 54 68 65 20 73 | 75 6d 20 6f 66 20 31 2e |" The s|um of 1.|
|00000340| 34 2c 20 36 2e 37 2c 20 | 31 32 2e 32 2c 20 61 6e |4, 6.7, |12.2, an|
|00000350| 64 20 2d 34 2e 31 20 69 | 73 20 22 29 3b 0d 0a 20 |d -4.1 i|s ");.. |
|00000360| 20 20 20 20 20 64 20 3d | 20 4d 79 43 6c 61 73 73 | d =| MyClass|
|00000370| 2e 73 75 6d 4f 66 28 31 | 2e 34 2c 20 36 2e 37 2c |.sumOf(1|.4, 6.7,|
|00000380| 20 31 32 2e 32 2c 20 2d | 34 2e 31 29 3b 0d 0a 20 | 12.2, -|4.1);.. |
|00000390| 20 20 20 20 20 53 79 73 | 74 65 6d 2e 6f 75 74 2e | Sys|tem.out.|
|000003a0| 70 72 69 6e 74 6c 6e 28 | 44 6f 75 62 6c 65 2e 74 |println(|Double.t|
|000003b0| 6f 53 74 72 69 6e 67 28 | 64 29 29 3b 0d 0a 20 20 |oString(|d));.. |
|000003c0| 20 7d 0d 0a 7d 0d 0a 00 | 00 00 00 00 00 00 00 00 | }..}...|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000410| 54 68 69 73 20 72 65 73 | 6f 75 72 63 65 20 66 6f |This res|ource fo|
|00000420| 72 6b 20 69 6e 74 65 6e | 74 69 6f 6e 61 6c 6c 79 |rk inten|tionally|
|00000430| 20 6c 65 66 74 20 62 6c | 61 6e 6b 20 20 20 00 00 | left bl|ank ..|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000510| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+