home *** CD-ROM | disk | FTP | other *** search
/ Sams Teach Yourself C in 21 Days (6th Edition) / STYC216E.ISO / mac / Examples / Day26 / MethodsDemo.java < prev    next >
MacBinary  |  2002-05-26  |  1.3 KB  |  [TEXT/LMAN]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun May 26 00:26:50 2002, modified Sun May 26 00:26:50 2002, creator 'LMAN', type ASCII, 666 bytes "MethodsDemo.java" , at 0x31a 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
keyvalue
macFileType[TEXT]
macFileCreator[LMAN]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 10 4d 65 74 68 6f 64 | 73 44 65 6d 6f 2e 6a 61 |..Method|sDemo.ja|
|00000010| 76 61 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |va......|........|
|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 9a 00 | 00 01 1e b9 16 14 8a b9 |........|........|
|00000060| 16 14 8a 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 59 4c 00 00 |........|....YL..|
|00000080| 69 6d 70 6f 72 74 20 6a | 61 76 61 2e 6c 61 6e 67 |import j|ava.lang|
|00000090| 2e 44 6f 75 62 6c 65 3b | 0d 0a 69 6d 70 6f 72 74 |.Double;|..import|
|000000a0| 20 6a 61 76 61 2e 6c 61 | 6e 67 2e 4c 6f 6e 67 3b | java.la|ng.Long;|
|000000b0| 0d 0a 0d 0a 70 75 62 6c | 69 63 20 63 6c 61 73 73 |....publ|ic class|
|000000c0| 20 4d 65 74 68 6f 64 73 | 44 65 6d 6f 20 7b 0d 0a | Methods|Demo {..|
|000000d0| 20 20 70 75 62 6c 69 63 | 20 73 74 61 74 69 63 20 | public| static |
|000000e0| 76 6f 69 64 20 6d 61 69 | 6e 28 53 74 72 69 6e 67 |void mai|n(String|
|000000f0| 20 61 72 67 73 5b 5d 29 | 20 7b 0d 0a 20 20 20 20 | args[])| {.. |
|00000100| 20 43 6c 61 73 73 57 69 | 74 68 4d 65 74 68 6f 64 | ClassWi|thMethod|
|00000110| 73 20 54 68 65 5f 43 6c | 61 73 73 3b 0d 0a 20 20 |s The_Cl|ass;.. |
|00000120| 20 20 20 53 74 72 69 6e | 67 20 74 65 6d 70 3b 0d | Strin|g temp;.|
|00000130| 0a 20 20 20 20 20 64 6f | 75 62 6c 65 20 64 3b 0d |. do|uble d;.|
|00000140| 0a 20 20 20 20 20 6c 6f | 6e 67 20 6c 3b 0d 0a 0d |. lo|ng l;...|
|00000150| 0a 20 20 20 20 20 54 68 | 65 5f 43 6c 61 73 73 20 |. Th|e_Class |
|00000160| 3d 20 6e 65 77 20 43 6c | 61 73 73 57 69 74 68 4d |= new Cl|assWithM|
|00000170| 65 74 68 6f 64 73 28 29 | 3b 0d 0a 20 20 20 20 20 |ethods()|;.. |
|00000180| 54 68 65 5f 43 6c 61 73 | 73 2e 64 69 73 70 6c 61 |The_Clas|s.displa|
|00000190| 79 54 65 78 74 28 22 55 | 73 69 6e 67 20 43 6c 61 |yText("U|sing Cla|
|000001a0| 73 73 57 69 74 68 4d 65 | 74 68 6f 64 73 3a 22 2c |ssWithMe|thods:",|
|000001b0| 20 74 72 75 65 29 3b 0d | 0a 20 20 20 20 20 54 68 | true);.|. Th|
|000001c0| 65 5f 43 6c 61 73 73 2e | 64 69 73 70 6c 61 79 54 |e_Class.|displayT|
|000001d0| 65 78 74 28 22 48 61 6c | 66 20 6f 66 20 39 39 20 |ext("Hal|f of 99 |
|000001e0| 69 73 20 22 2c 20 66 61 | 6c 73 65 29 3b 0d 0a 20 |is ", fa|lse);.. |
|000001f0| 20 20 20 20 64 20 3d 20 | 54 68 65 5f 43 6c 61 73 | d = |The_Clas|
|00000200| 73 2e 68 61 6c 66 4f 66 | 28 39 39 29 3b 0d 0a 20 |s.halfOf|(99);.. |
|00000210| 20 20 20 20 74 65 6d 70 | 20 3d 20 44 6f 75 62 6c | temp| = Doubl|
|00000220| 65 2e 74 6f 53 74 72 69 | 6e 67 28 64 29 3b 0d 0a |e.toStri|ng(d);..|
|00000230| 20 20 20 20 20 54 68 65 | 5f 43 6c 61 73 73 2e 64 | The|_Class.d|
|00000240| 69 73 70 6c 61 79 54 65 | 78 74 28 74 65 6d 70 2c |isplayTe|xt(temp,|
|00000250| 20 74 72 75 65 29 3b 0d | 0a 20 20 20 20 20 54 68 | true);.|. Th|
|00000260| 65 5f 43 6c 61 73 73 2e | 64 69 73 70 6c 61 79 54 |e_Class.|displayT|
|00000270| 65 78 74 28 22 54 68 65 | 20 73 75 6d 20 6f 66 20 |ext("The| sum of |
|00000280| 31 32 33 34 35 20 61 6e | 64 20 39 39 37 37 36 36 |12345 an|d 997766|
|00000290| 20 69 73 20 22 2c 20 66 | 61 6c 73 65 29 3b 0d 0a | is ", f|alse);..|
|000002a0| 20 20 20 20 20 6c 20 3d | 20 54 68 65 5f 43 6c 61 | l =| The_Cla|
|000002b0| 73 73 2e 73 75 6d 4f 66 | 28 31 32 33 34 35 2c 20 |ss.sumOf|(12345, |
|000002c0| 39 39 37 37 36 36 29 3b | 0d 0a 20 20 20 20 20 74 |997766);|.. t|
|000002d0| 65 6d 70 20 3d 20 4c 6f | 6e 67 2e 74 6f 53 74 72 |emp = Lo|ng.toStr|
|000002e0| 69 6e 67 28 6c 29 3b 0d | 0a 20 20 20 20 20 54 68 |ing(l);.|. Th|
|000002f0| 65 5f 43 6c 61 73 73 2e | 64 69 73 70 6c 61 79 54 |e_Class.|displayT|
|00000300| 65 78 74 28 74 65 6d 70 | 2c 20 74 72 75 65 29 3b |ext(temp|, true);|
|00000310| 0d 0a 20 20 7d 0d 0a 7d | 0d 0a 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 |........|........|
+--------+-------------------------+-------------------------+--------+--------+