Java programmers need help

MorningWood

New Member
I need serious help on Java programming. I cannot...for the freaking life of me figure out how to do this shit


INSTRUCTIONS:

Part 4. Create a Java application that:
Has your name as output and displays the British pound symbol using a unicode instead of the symbol itself.
Example:
Susan Train £

Can someone PLEASE help me out on this, write the java code and everything needed in order to run the java application. I am using jGrasp btw
 

MorningWood

New Member
Cannot find anywhere how to PM someone. Any other forum im on just says "Personal Message this person" but nothing on this site says anything about being able to PM someone
 

Vizy

New Member
so you just want the java program to display (blahblahblah) on the screen?

Just find a simple code that displays something, and in the system.out.print area put what you want in the parenthesis.
 

MorningWood

New Member
so you just want the java program to display (blahblahblah) on the screen?

Just find a simple code that displays something, and in the system.out.print area put what you want in the parenthesis.

yea I know that. And I know how to display my name and the code for the british pound symbol = u00A3(?)

I just dont know how to put them together and make it run...you know what I mean?
 

Vizy

New Member
IDK about the unicode thing (haven't learned that yet), but let me finish my math hw, then i'll post up something real quick.
 

Christopher

VIP Member
Code:
public class Example {
	public static void main (String[] args) {
		System.out.print("Chroder [U][B]\u00A3[/B][/U]");
	}
}

It's quite simple. The only "new" thing with printing unicode rather than a regular string is using the \u<hexcode> escape sequence. A quick google found that the hex codepoint for the pound symbol is 00A3.

If you're interested I've written about Unicode on my blog once and tried to make it understandable for people who don't really know about character encoding. (That is about Unicode, not about Java. But it helps to understand what Unicode is before diving into programming with Unicode!)
 
Last edited:

MorningWood

New Member
Code:
public class Example {
	public static void main (String[] args) {
		System.out.print("Chroder [U][B]\u00A3[/B][/U]");
	}
}

It's quite simple. The only "new" thing with printing unicode rather than a regular string is using the \u<hexcode> escape sequence. A quick google found that the hex codepoint for the pound symbol is 00A3.

If you're interested I've written about Unicode on my blog once and tried to make it understandable for people who don't really know about character encoding.

hold on leme do it in jGrasp, I thought I did that exact coding and it gave me an error
 

MorningWood

New Member
Holy shit it worked. Youre the man Chroder. I dont know what was different about this time that made it work rather than last time, but its workin. I have the biggest headache from this, I HATE java. HTML is so much easier for me.

----jGRASP exec: java Activity1_pt4_colton

Colton S £
----jGRASP: operation complete.


Thanks a lot to the both of you :D

/thread
 
Top