[VIEWED 12533
TIMES]
|
SAVE! for ease of future access.
|
|
|
hoina_hola
Please log in to subscribe to hoina_hola's postings.
Posted on 11-07-08 12:37
AM
Reply
[Subscribe]
|
Login in to Rate this Post:
2
?
Liked by
|
|
Design and implement an application that prints a table showing a subset of the Unicode characters and their numeric values. Print five number/character pairs per line, separated by tab characters. Print the table for numeric values from 32 (the space character) to 126 (the ~ character), which corresponds to the printable ASCII subset of the Unicode character set. Compare your output to the table in Appendix C. Unlike the table in Appendix C, the values in your table can increase as they go across a row.
anyone please??? i don have any clue..
|
|
|
|
hoina_hola
Please log in to subscribe to hoina_hola's postings.
Posted on 11-08-08 11:03
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
1
?
Liked by
|
|
I guess no one can do this...okie..cool...
|
|
|
techGuy
Please log in to subscribe to techGuy's postings.
Posted on 11-09-08 1:10
AM
Reply
[Subscribe]
|
Login in to Rate this Post:
1
?
Liked by
|
|
|
|
|
techGuy
Please log in to subscribe to techGuy's postings.
Posted on 11-09-08 1:53
AM
Reply
[Subscribe]
|
Login in to Rate this Post:
1
?
Liked by
|
|
guess nothing on Appendix C..okie..cool..
i guess this is what u want.... hope u can do the formatting...and the remaining code..
for (int i=32;i<=126;i++)
{
char c = (char) i;
System. out.println("Number:" + i + " Ascii:" + c);
}
The output was
Number:32 Ascii:
Number:33 Ascii:!
Number:34 Ascii:"
Number:35 Ascii:#
Number:36 Ascii:$
Number:37 Ascii:%
Number:38 Ascii:&
Number:39 Ascii:'
Number:40 Ascii:(
Number:41 Ascii:)
Number:42 Ascii:*
Number:43 Ascii:+
Number:44 Ascii:,
Number:45 Ascii:-
Number:46 Ascii:.
Number:47 Ascii:/
Number:48 Ascii:0
Number:49 Ascii:1
Number:50 Ascii:2
Number:51 Ascii:3
Number:52 Ascii:4
Number:53 Ascii:5
Number:54 Ascii:6
Number:55 Ascii:7
Number:56 Ascii:8
Number:57 Ascii:9
Number:58 Ascii::
Number:59 Ascii:;
Number:60 Ascii:<
Number:61 Ascii:=
Number:62 Ascii:>
Number:63 Ascii:?
Number:64 Ascii:@
Number:65 Ascii:A
Number:66 Ascii:B
Number:67 Ascii:C
Number:68 Ascii:D
Number:69 Ascii:E
Number:70 Ascii:F
Number:71 Ascii:G
Number:72 Ascii:H
Number:73 Ascii:I
Number:74 Ascii:J
Number:75 Ascii:K
Number:76 Ascii:L
Number:77 Ascii:M
Number:78 Ascii:N
Number:79 Ascii:O
Number:80 Ascii:P
Number:81 Ascii:Q
Number:82 Ascii:R
Number:83 Ascii:S
Number:84 Ascii:T
Number:85 Ascii:U
Number:86 Ascii:V
Number:87 Ascii:W
Number:88 Ascii:X
Number:89 Ascii:Y
Number:90 Ascii:Z
Number:91 Ascii:[
Number:92 Ascii:\
Number:93 Ascii:]
Number:94 Ascii:^
Number:95 Ascii:_
Number:96 Ascii:`
Number:97 Ascii:a
Number:98 Ascii:b
Number:99 Ascii:c
Number:100 Ascii:d
Number:101 Ascii:e
Number:102 Ascii:f
Number:103 Ascii:g
Number:104 Ascii:h
Number:105 Ascii:i
Number:106 Ascii:j
Number:107 Ascii:k
Number:108 Ascii:l
Number:109 Ascii:m
Number:110 Ascii:n
Number:111 Ascii:o
Number:112 Ascii:p
Number:113 Ascii:q
Number:114 Ascii:r
Number:115 Ascii:s
Number:116 Ascii:t
Number:117 Ascii:u
Number:118 Ascii:v
Number:119 Ascii:w
Number:120 Ascii:x
Number:121 Ascii:y
Number:122 Ascii:z
Number:123 Ascii:{
Number:124 Ascii:|
Number:125 Ascii:}
Number:126 Ascii:~
Last edited: 09-Nov-08 01:54 AM
Last edited: 09-Nov-08 01:55 AM
|
|
|
khai_k_khai_k
Please log in to subscribe to khai_k_khai_k's postings.
Posted on 11-09-08 12:20
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
I made some modifications with Tech_guy code:
A more brute way to display the results according to the question would be:
public class AsciiPrinter {
public static void main(String[] args) {
for (int i = 32; i <= 126; i+=5){
System.out.println(
i + ": " + (char)i + " \t" +
(i+1) + ": " + (char)(i+1) + " \t" +
(i+2) + ": " + (char)(i+2) + " \t" +
(i+3) + ": " + (char)(i+3) + " \t" +
(i+4) + ": " + (char)(i+4));
}
}
}
And the output Results will look like (Five column pairs separated by a tab):
32: 33: ! 34: " 35: # 36: $
37: % 38: & 39: ' 40: ( 41: )
42: * 43: + 44: , 45: - 46: .
47: / 48: 0 49: 1 50: 2 51: 3
52: 4 53: 5 54: 6 55: 7 56: 8
57: 9 58: : 59: ; 60: < 61: =
62: > 63: ? 64: @ 65: A 66: B
67: C 68: D 69: E 70: F 71: G
72: H 73: I 74: J 75: K 76: L
77: M 78: N 79: O 80: P 81: Q
82: R 83: S 84: T 85: U 86: V
87: W 88: X 89: Y 90: Z 91: [
92: \ 93: ] 94: ^ 95: _ 96: `
97: a 98: b 99: c 100: d 101: e
102: f 103: g 104: h 105: i 106: j
107: k 108: l 109: m 110: n 111: o
112: p 113: q 114: r 115: s 116: t
117: u 118: v 119: w 120: x 121: y
122: z 123: { 124: | 125: } 126: ~
Happy Programming :)
|
|
|
khai_k_khai_k
Please log in to subscribe to khai_k_khai_k's postings.
Posted on 11-09-08 12:23
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
1
?
Liked by
|
|
oops the formatting was not preserved in Sajha. I am posting a screenshot instead:
|
|
|
khai_k_khai_k
Please log in to subscribe to khai_k_khai_k's postings.
Posted on 11-09-08 12:29
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
More elegant way to do the above program, in which you just have to change a variable for displaying the number of columns:
public class AsciiPrinter {
public static void main(String[] args) {
int numberOfColumns = 5;
for (int i = 32; i <= 126; i += numberOfColumns) {
int columnPointer = 0;
while (columnPointer < numberOfColumns) {
System.out.print(
(i + columnPointer) + ": " + (char) (i + columnPointer) + " \t");
columnPointer++;
}
System.out.println();
}
}
}
|
|
|
hoina_hola
Please log in to subscribe to hoina_hola's postings.
Posted on 11-09-08 11:59
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
thanks for your time guys..it worked
|
|
|
divdude
Please log in to subscribe to divdude's postings.
Posted on 11-10-08 12:16
AM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
http://unicode.org/charts/PDF/U0000.pdf here is the character code for the unicode you are looking. To print unicode System.out.println("\uxxxx")
|
|
|
Kawasoti
Please log in to subscribe to Kawasoti's postings.
Posted on 11-30-08 10:10
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
To learn Java in 5 weeks; go to this website. It has very few but very useful and interesting topics, and Question Answer . It is based on a Training a http://javasansar.blogspot.com/
|
|
|
techGuy
Please log in to subscribe to techGuy's postings.
Posted on 12-01-08 3:47
AM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
|
|
|
techGuy
Please log in to subscribe to techGuy's postings.
Posted on 12-01-08 11:52
AM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
I've not used helio's textpad by myself, but if that helped u , then it should be good for others too, eclipse and netbeans will make it easier to write/edit and debug the program. I'm not sure if helio's has the facility to debug java program. Oh yeah, if u really want to go with java, learn atleast one framework, like struts, spring etc. This will give u the practice of professional programming.
|
|