/ Sams Teach Yourself C in 21 Days (6th Edition)
/ STYC216E.ISO / mac / Examples / Day25 / StringTest.java ![]() | < prev | next > |
MacBinary | 2002-05-25 | 1.1 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, Sat May 25 21:12:10 2002, modified Sat May 25 21:12:10 2002, creator 'LMAN', type ASCII, 612 bytes "StringTest.java" , at 0x2e4 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 0f 53 74 72 69 6e 67 | 54 65 73 74 2e 6a 61 76 |..String|Test.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 02 64 00 | 00 01 1e b9 15 e6 ea b9 |......d.|........|
|00000060| 15 e6 ea 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 d7 08 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 79 73 74 65 6d 3b | 0d 0a 69 6d 70 6f 72 74 |.System;|..import|
|000000a0| 20 6a 61 76 61 2e 6c 61 | 6e 67 2e 53 74 72 69 6e | java.la|ng.Strin|
|000000b0| 67 3b 0d 0a 0d 0a 70 75 | 62 6c 69 63 20 63 6c 61 |g;....pu|blic cla|
|000000c0| 73 73 20 53 74 72 69 6e | 67 54 65 73 74 20 7b 0d |ss Strin|gTest {.|
|000000d0| 0a 0d 0a 20 20 20 20 70 | 75 62 6c 69 63 20 73 74 |... p|ublic st|
|000000e0| 61 74 69 63 20 76 6f 69 | 64 20 6d 61 69 6e 28 53 |atic voi|d main(S|
|000000f0| 74 72 69 6e 67 20 61 72 | 67 73 5b 5d 29 20 7b 0d |tring ar|gs[]) {.|
|00000100| 0a 0d 0a 20 20 20 20 53 | 74 72 69 6e 67 20 73 31 |... S|tring s1|
|00000110| 20 3d 20 22 54 65 61 63 | 68 20 59 6f 75 72 73 65 | = "Teac|h Yourse|
|00000120| 6c 66 20 43 20 69 6e 20 | 32 31 20 44 61 79 73 22 |lf C in |21 Days"|
|00000130| 3b 0d 0a 0d 0a 20 20 20 | 20 53 79 73 74 65 6d 2e |;.... | System.|
|00000140| 6f 75 74 2e 70 72 69 6e | 74 6c 6e 28 22 54 68 65 |out.prin|tln("The|
|00000150| 20 6f 72 69 67 69 6e 61 | 6c 20 73 74 72 69 6e 67 | origina|l string|
|00000160| 3a 20 22 20 2b 20 73 31 | 29 3b 0d 0a 20 20 20 20 |: " + s1|);.. |
|00000170| 53 79 73 74 65 6d 2e 6f | 75 74 2e 70 72 69 6e 74 |System.o|ut.print|
|00000180| 6c 6e 28 22 43 6f 6e 76 | 65 72 74 65 64 20 74 6f |ln("Conv|erted to|
|00000190| 20 75 70 70 65 72 63 61 | 73 65 3a 20 22 20 2b 20 | upperca|se: " + |
|000001a0| 73 31 2e 74 6f 55 70 70 | 65 72 43 61 73 65 28 29 |s1.toUpp|erCase()|
|000001b0| 29 3b 0d 0a 20 20 20 20 | 53 79 73 74 65 6d 2e 6f |);.. |System.o|
|000001c0| 75 74 2e 70 72 69 6e 74 | 6c 6e 28 22 43 6f 6e 76 |ut.print|ln("Conv|
|000001d0| 65 72 74 65 64 20 74 6f | 20 6c 6f 77 65 72 63 61 |erted to| lowerca|
|000001e0| 73 65 3a 20 22 20 2b 20 | 73 31 2e 74 6f 4c 6f 77 |se: " + |s1.toLow|
|000001f0| 65 72 43 61 73 65 28 29 | 29 3b 0d 0a 20 20 20 20 |erCase()|);.. |
|00000200| 53 79 73 74 65 6d 2e 6f | 75 74 2e 70 72 69 6e 74 |System.o|ut.print|
|00000210| 6c 6e 28 22 54 68 65 20 | 66 69 72 73 74 20 59 20 |ln("The |first Y |
|00000220| 69 73 20 61 74 20 70 6f | 73 69 74 69 6f 6e 20 22 |is at po|sition "|
|00000230| 20 2b 20 73 31 2e 69 6e | 64 65 78 4f 66 28 27 59 | + s1.in|dexOf('Y|
|00000240| 27 29 29 3b 0d 0a 20 20 | 20 20 53 79 73 74 65 6d |'));.. | System|
|00000250| 2e 6f 75 74 2e 70 72 69 | 6e 74 6c 6e 28 22 52 65 |.out.pri|ntln("Re|
|00000260| 70 6c 61 63 69 6e 67 20 | 27 65 27 20 77 69 74 68 |placing |'e' with|
|00000270| 20 27 21 27 3a 20 22 2b | 73 31 2e 72 65 70 6c 61 | '!': "+|s1.repla|
|00000280| 63 65 28 27 65 27 2c 20 | 27 21 27 29 29 3b 0d 0a |ce('e', |'!'));..|
|00000290| 20 20 20 20 53 79 73 74 | 65 6d 2e 6f 75 74 2e 70 | Syst|em.out.p|
|000002a0| 72 69 6e 74 6c 6e 28 22 | 54 68 69 73 20 73 74 72 |rintln("|This str|
|000002b0| 69 6e 67 20 68 61 73 20 | 22 20 2b 20 73 31 2e 6c |ing has |" + s1.l|
|000002c0| 65 6e 67 74 68 28 29 2b | 22 20 63 68 61 72 61 63 |ength()+|" charac|
|000002d0| 74 65 72 73 2e 22 29 3b | 0d 0a 20 20 20 20 7d 0d |ters.");|.. }.|
|000002e0| 0a 7d 0d 0a 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000310| 54 68 69 73 20 72 65 73 | 6f 75 72 63 65 20 66 6f |This res|ource fo|
|00000320| 72 6b 20 69 6e 74 65 6e | 74 69 6f 6e 61 6c 6c 79 |rk inten|tionally|
|00000330| 20 6c 65 66 74 20 62 6c | 61 6e 6b 20 20 20 00 00 | left bl|ank ..|
|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 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|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 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000410| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 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 |........|........|
+--------+-------------------------+-------------------------+--------+--------+