home *** CD-ROM | disk | FTP | other *** search
/ Sams Teach Yourself C in 21 Days (6th Edition) / STYC216E.ISO / mac / Examples / Day26 / NumberList.java < prev    next >
MacBinary  |  2002-05-26  |  1.4 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 01:13:22 2002, modified Sun May 26 01:13:22 2002, creator 'LMAN', type ASCII, 861 bytes "NumberList.java" , at 0x3dd 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 0f 4e 75 6d 62 65 72 | 4c 69 73 74 2e 6a 61 76 |..Number|List.jav|
|00000010| 61 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |a.......|........|
|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 5d 00 | 00 01 1e b9 16 1f 72 b9 |......].|......r.|
|00000060| 16 1f 72 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..r.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f6 c2 00 00 |........|........|
|00000080| 70 75 62 6c 69 63 20 63 | 6c 61 73 73 20 4e 75 6d |public c|lass Num|
|00000090| 62 65 72 4c 69 73 74 20 | 7b 0d 0a 0d 0a 20 20 70 |berList |{.... p|
|000000a0| 75 62 6c 69 63 20 73 74 | 61 74 69 63 20 76 6f 69 |ublic st|atic voi|
|000000b0| 64 20 6d 61 69 6e 28 53 | 74 72 69 6e 67 20 61 72 |d main(S|tring ar|
|000000c0| 67 73 5b 5d 29 20 7b 0d | 0a 0d 0a 20 20 20 20 4c |gs[]) {.|... L|
|000000d0| 69 73 74 4f 66 4e 75 6d | 62 65 72 73 20 4d 79 4c |istOfNum|bers MyL|
|000000e0| 69 73 74 20 3d 20 6e 65 | 77 20 4c 69 73 74 4f 66 |ist = ne|w ListOf|
|000000f0| 4e 75 6d 62 65 72 73 28 | 29 3b 0d 0a 20 20 20 20 |Numbers(|);.. |
|00000100| 42 65 74 74 65 72 4c 69 | 73 74 4f 66 4e 75 6d 62 |BetterLi|stOfNumb|
|00000110| 65 72 73 20 4d 79 42 65 | 74 74 65 72 4c 69 73 74 |ers MyBe|tterList|
|00000120| 20 3d 20 6e 65 77 20 42 | 65 74 74 65 72 4c 69 73 | = new B|etterLis|
|00000130| 74 4f 66 4e 75 6d 62 65 | 72 73 28 29 3b 0d 0a 0d |tOfNumbe|rs();...|
|00000140| 0a 20 20 20 20 4d 79 4c | 69 73 74 2e 41 64 64 28 |. MyL|ist.Add(|
|00000150| 34 29 3b 0d 0a 20 20 20 | 20 4d 79 4c 69 73 74 2e |4);.. | MyList.|
|00000160| 41 64 64 28 38 29 3b 0d | 0a 20 20 20 20 4d 79 4c |Add(8);.|. MyL|
|00000170| 69 73 74 2e 41 64 64 28 | 39 2e 36 29 3b 0d 0a 20 |ist.Add(|9.6);.. |
|00000180| 20 20 20 4d 79 42 65 74 | 74 65 72 4c 69 73 74 2e | MyBet|terList.|
|00000190| 41 64 64 28 34 29 3b 0d | 0a 20 20 20 20 4d 79 42 |Add(4);.|. MyB|
|000001a0| 65 74 74 65 72 4c 69 73 | 74 2e 41 64 64 28 38 29 |etterLis|t.Add(8)|
|000001b0| 3b 0d 0a 20 20 20 20 4d | 79 42 65 74 74 65 72 4c |;.. M|yBetterL|
|000001c0| 69 73 74 2e 41 64 64 28 | 39 2e 36 29 3b 0d 0a 0d |ist.Add(|9.6);...|
|000001d0| 0a 20 20 20 20 53 79 73 | 74 65 6d 2e 6f 75 74 2e |. Sys|tem.out.|
|000001e0| 70 72 69 6e 74 6c 6e 28 | 22 46 72 6f 6d 20 63 6c |println(|"From cl|
|000001f0| 61 73 73 20 4c 69 73 74 | 4f 66 4e 75 6d 62 65 72 |ass List|OfNumber|
|00000200| 73 3a 22 29 3b 0d 0a 20 | 20 20 20 53 79 73 74 65 |s:");.. | Syste|
|00000210| 6d 2e 6f 75 74 2e 70 72 | 69 6e 74 28 22 54 6f 74 |m.out.pr|int("Tot|
|00000220| 61 6c 20 3d 20 22 29 3b | 0d 0a 20 20 20 20 53 79 |al = ");|.. Sy|
|00000230| 73 74 65 6d 2e 6f 75 74 | 2e 70 72 69 6e 74 6c 6e |stem.out|.println|
|00000240| 28 4d 79 4c 69 73 74 2e | 74 6f 74 61 6c 28 29 29 |(MyList.|total())|
|00000250| 3b 0d 0a 20 20 20 20 53 | 79 73 74 65 6d 2e 6f 75 |;.. S|ystem.ou|
|00000260| 74 2e 70 72 69 6e 74 28 | 22 43 6f 75 6e 74 20 3d |t.print(|"Count =|
|00000270| 20 22 29 3b 0d 0a 20 20 | 20 20 53 79 73 74 65 6d | ");.. | System|
|00000280| 2e 6f 75 74 2e 70 72 69 | 6e 74 6c 6e 28 4d 79 4c |.out.pri|ntln(MyL|
|00000290| 69 73 74 2e 63 6f 75 6e | 74 28 29 29 3b 0d 0a 20 |ist.coun|t());.. |
|000002a0| 20 20 20 53 79 73 74 65 | 6d 2e 6f 75 74 2e 70 72 | Syste|m.out.pr|
|000002b0| 69 6e 74 6c 6e 28 22 46 | 72 6f 6d 20 63 6c 61 73 |intln("F|rom clas|
|000002c0| 73 20 42 65 74 74 65 72 | 4c 69 73 74 4f 66 4e 75 |s Better|ListOfNu|
|000002d0| 6d 62 65 72 73 3a 22 29 | 3b 0d 0a 20 20 20 20 53 |mbers:")|;.. S|
|000002e0| 79 73 74 65 6d 2e 6f 75 | 74 2e 70 72 69 6e 74 28 |ystem.ou|t.print(|
|000002f0| 22 54 6f 74 61 6c 20 3d | 20 22 29 3b 0d 0a 20 20 |"Total =| ");.. |
|00000300| 20 20 53 79 73 74 65 6d | 2e 6f 75 74 2e 70 72 69 | System|.out.pri|
|00000310| 6e 74 6c 6e 28 4d 79 42 | 65 74 74 65 72 4c 69 73 |ntln(MyB|etterLis|
|00000320| 74 2e 74 6f 74 61 6c 28 | 29 29 3b 0d 0a 20 20 20 |t.total(|));.. |
|00000330| 20 53 79 73 74 65 6d 2e | 6f 75 74 2e 70 72 69 6e | System.|out.prin|
|00000340| 74 28 22 43 6f 75 6e 74 | 20 3d 20 22 29 3b 0d 0a |t("Count| = ");..|
|00000350| 20 20 20 20 53 79 73 74 | 65 6d 2e 6f 75 74 2e 70 | Syst|em.out.p|
|00000360| 72 69 6e 74 6c 6e 28 4d | 79 42 65 74 74 65 72 4c |rintln(M|yBetterL|
|00000370| 69 73 74 2e 63 6f 75 6e | 74 28 29 29 3b 0d 0a 20 |ist.coun|t());.. |
|00000380| 20 20 20 53 79 73 74 65 | 6d 2e 6f 75 74 2e 70 72 | Syste|m.out.pr|
|00000390| 69 6e 74 28 22 41 76 65 | 72 61 67 65 20 3d 20 22 |int("Ave|rage = "|
|000003a0| 29 3b 0d 0a 20 20 20 20 | 53 79 73 74 65 6d 2e 6f |);.. |System.o|
|000003b0| 75 74 2e 70 72 69 6e 74 | 6c 6e 28 4d 79 42 65 74 |ut.print|ln(MyBet|
|000003c0| 74 65 72 4c 69 73 74 2e | 61 76 65 72 61 67 65 28 |terList.|average(|
|000003d0| 29 29 3b 0d 0a 20 20 7d | 0d 0a 7d 0d 0a 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 |........|........|
+--------+-------------------------+-------------------------+--------+--------+