/ Sams Teach Yourself C in 21 Days (6th Edition)
/ STYC216E.ISO / mac / Examples / Day26 / ClassWithMethods.java ![]() | < prev | next > |
MacBinary | 2002-05-26 | 1.3 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:24:32 2002, modified Sun May 26 00:24:32 2002, creator 'LMAN', type ASCII, 652 bytes "ClassWithMethods.java" , at 0x30c 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 15 43 6c 61 73 73 57 | 69 74 68 4d 65 74 68 6f |..ClassW|ithMetho|
|00000010| 64 73 2e 6a 61 76 61 00 | 00 00 00 00 00 00 00 00 |ds.java.|........|
|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 02 8c 00 | 00 01 1e b9 16 14 00 b9 |........|........|
|00000060| 16 14 00 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 51 a0 00 00 |........|....Q...|
|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 0d 0a 70 75 62 6c |.String;|....publ|
|000000a0| 69 63 20 63 6c 61 73 73 | 20 43 6c 61 73 73 57 69 |ic class| ClassWi|
|000000b0| 74 68 4d 65 74 68 6f 64 | 73 20 7b 0d 0a 0d 0a 20 |thMethod|s {.... |
|000000c0| 20 20 20 70 75 62 6c 69 | 63 20 76 6f 69 64 20 64 | publi|c void d|
|000000d0| 69 73 70 6c 61 79 54 65 | 78 74 28 53 74 72 69 6e |isplayTe|xt(Strin|
|000000e0| 67 20 6d 65 73 73 61 67 | 65 2c 20 62 6f 6f 6c 65 |g messag|e, boole|
|000000f0| 61 6e 20 6e 65 77 6c 69 | 6e 65 29 20 7b 0d 0a 20 |an newli|ne) {.. |
|00000100| 20 20 20 2f 2f 20 44 69 | 73 70 6c 61 79 73 20 6d | // Di|splays m|
|00000110| 65 73 73 61 67 65 20 6f | 6e 20 74 68 65 20 63 6f |essage o|n the co|
|00000120| 6e 73 6f 6c 65 2c 20 6d | 6f 76 69 6e 67 20 74 6f |nsole, m|oving to|
|00000130| 0d 0a 20 20 20 20 2f 2f | 20 74 68 65 20 73 74 61 |.. //| the sta|
|00000140| 72 74 20 6f 66 20 61 20 | 6e 65 77 20 6c 69 6e 65 |rt of a |new line|
|00000150| 20 61 66 74 65 72 20 6d | 65 73 73 61 67 65 20 6f | after m|essage o|
|00000160| 6e 6c 79 0d 0a 20 20 20 | 20 2f 2f 20 69 66 20 6e |nly.. | // if n|
|00000170| 65 77 6c 69 6e 65 20 69 | 73 20 74 72 75 65 2e 0d |ewline i|s true..|
|00000180| 0a 20 20 20 20 69 66 20 | 28 6e 65 77 6c 69 6e 65 |. if |(newline|
|00000190| 29 0d 0a 20 20 20 20 20 | 20 20 20 53 79 73 74 65 |).. | Syste|
|000001a0| 6d 2e 6f 75 74 2e 70 72 | 69 6e 74 6c 6e 28 6d 65 |m.out.pr|intln(me|
|000001b0| 73 73 61 67 65 29 3b 0d | 0a 20 20 20 20 65 6c 73 |ssage);.|. els|
|000001c0| 65 0d 0a 20 20 20 20 20 | 20 20 20 53 79 73 74 65 |e.. | Syste|
|000001d0| 6d 2e 6f 75 74 2e 70 72 | 69 6e 74 28 6d 65 73 73 |m.out.pr|int(mess|
|000001e0| 61 67 65 29 3b 0d 0a 20 | 20 20 20 7d 0d 0a 0d 0a |age);.. | }....|
|000001f0| 20 20 20 20 70 75 62 6c | 69 63 20 64 6f 75 62 6c | publ|ic doubl|
|00000200| 65 20 68 61 6c 66 4f 66 | 28 64 6f 75 62 6c 65 20 |e halfOf|(double |
|00000210| 76 61 6c 75 65 29 20 7b | 0d 0a 20 20 20 20 2f 2f |value) {|.. //|
|00000220| 20 52 65 74 75 72 6e 73 | 20 68 61 6c 66 20 6f 66 | Returns| half of|
|00000230| 20 69 74 73 20 61 72 67 | 75 6d 65 6e 74 2e 0d 0a | its arg|ument...|
|00000240| 20 20 20 20 72 65 74 75 | 72 6e 20 76 61 6c 75 65 | retu|rn value|
|00000250| 20 2f 20 32 3b 0d 0a 20 | 20 20 20 7d 0d 0a 0d 0a | / 2;.. | }....|
|00000260| 20 20 20 20 70 75 62 6c | 69 63 20 6c 6f 6e 67 20 | publ|ic long |
|00000270| 73 75 6d 4f 66 28 6c 6f | 6e 67 20 76 61 6c 75 65 |sumOf(lo|ng value|
|00000280| 31 2c 20 6c 6f 6e 67 20 | 76 61 6c 75 65 32 29 20 |1, long |value2) |
|00000290| 7b 0d 0a 20 20 20 20 2f | 2f 20 52 65 74 75 72 6e |{.. /|/ Return|
|000002a0| 73 20 74 68 65 20 73 75 | 6d 20 6f 66 20 69 74 73 |s the su|m of its|
|000002b0| 20 61 72 67 75 6d 65 6e | 74 73 2e 0d 0a 20 20 20 | argumen|ts... |
|000002c0| 20 6c 6f 6e 67 20 72 65 | 73 75 6c 74 3b 0d 0a 20 | long re|sult;.. |
|000002d0| 20 20 20 72 65 73 75 6c | 74 20 3d 20 76 61 6c 75 | resul|t = valu|
|000002e0| 65 31 20 2b 20 76 61 6c | 75 65 32 3b 0d 0a 20 20 |e1 + val|ue2;.. |
|000002f0| 20 20 72 65 74 75 72 6e | 20 72 65 73 75 6c 74 3b | return| result;|
|00000300| 0d 0a 20 20 20 20 7d 0d | 0a 7d 0d 0a 00 00 00 00 |.. }.|.}......|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000390| 54 68 69 73 20 72 65 73 | 6f 75 72 63 65 20 66 6f |This res|ource fo|
|000003a0| 72 6b 20 69 6e 74 65 6e | 74 69 6f 6e 61 6c 6c 79 |rk inten|tionally|
|000003b0| 20 6c 65 66 74 20 62 6c | 61 6e 6b 20 20 20 00 00 | left bl|ank ..|
|000003c0| 00 00 00 00 00 00 00 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 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|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 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000490| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 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 |........|........|
+--------+-------------------------+-------------------------+--------+--------+