1 Replies - 3007 Views - Last Post: 10 September 2012 - 08:01 AM Rate Topic: -----

#1 evenmu  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 30-August 12

Printing out card-icons in java(hearts, diamonds, spades, clubs)

Posted 08 September 2012 - 06:38 AM

Hey

I am making a simple card game, and i want to print out the four card icons.
How can i do this ?
I have tryd to use unicode, but i only getting the questions mark(?) in teh consol window.


public class CardIconTest {

	public static void main(String[]args){
		
		char test = '\u2764';
		System.out.printf("%s", test);
	}
}


Is This A Good Question/Topic? 0
  • +

Replies To: Printing out card-icons in java(hearts, diamonds, spades, clubs)

#2 cfoley  Icon User is online

  • Cabbage
  • member icon

Reputation: 2006
  • View blog
  • Posts: 4,171
  • Joined: 11-December 07

Re: Printing out card-icons in java(hearts, diamonds, spades, clubs)

Posted 10 September 2012 - 08:01 AM

If the font the console uses doesn't support that character there is not much you can do. For a console game, you will have to choose a different character.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1