This site requires JavaScript, please enable it in your browser!
Greenfoot back
Roshan123
Roshan123 wrote ...

2020/12/1

Printing symbols

1
2
Roshan123 Roshan123

2020/12/2

#
128102 prints box But its a symbol of a boy And some of them are blank....
danpost danpost

2020/12/3

#
Roshan123 wrote...
128102 prints box But its a symbol of a boy And some of them are blank....
char maxes out at 65535.
Roshan123 Roshan123

2020/12/3

#
Were u angry??? Sorry plz forgive me
danpost danpost

2020/12/3

#
Roshan123 wrote...
Were u angry??? Sorry plz forgive me
No -- no harm .. no foul. Delete last 2 comments from other discussion thread.
Roshan123 Roshan123

2020/12/3

#
danpost wrote...
Roshan123 wrote...
128102 prints box But its a symbol of a boy And some of them are blank....
char maxes out at 65535.
So their is no more characters above 65535 I knew it already but most of the website show that their are characters above 65535 which can also be printed
danpost danpost

2020/12/3

#
The Uniicode character set goes beyond 65535; but the java primitive type char will not hold any value greater than 65535.
RcCookie RcCookie

2020/12/4

#
To write any character from a unicode, you can use
char c = ‚/u1234‘;
Where 1233 is the Unicode character code. In your case this would be
String title = „Press down /u2b07“;
Roshan123 Roshan123

2020/12/4

#
@ RcCookies, aIs it utf-8 ???
danpost danpost

2020/12/4

#
RcCookie wrote...
In your case this would be
String title = „Press down /u2b07“;
Actually, 2b07 draws a box. Use 2193 instead.
Roshan123 Roshan123

2020/12/4

#
If i m not wrong 2193 is decimal But how to use /u2b07 What is it???(i have seen it but i forgot and never tried to understand because decimal was more easier for me to understand) Is their any tutorial for it for better understanding
Roshan123 Roshan123

2020/12/4

#
Roshan123 wrote...
Is their any tutorial for it for better understanding
I m asking u both becaz u both have a surplus experience.....
danpost danpost

2020/12/4

#
Roshan123 wrote...
If i m not wrong 2193 is decimal
Incorrect -- it is hexadecimal, in the same context as 2b07. In base 16 (hexadecmal), each digit is a power of 16, starting at right with 0 and incrementing as you go left. This is as in any base. Decimal is in powers of 10, starting at right with 0, incrementing as you go left. 2193h is equivalent to: ((( 2 *16)+ 1 )*16+ 9 )*16+ 3 or 2 *16^3 + 1 *16^2 + 9 *16^1 + 3 *16^0 or 8595 (base 10) Seems like we've gone round full circle ( back to (char)8595 )
danpost danpost

2020/12/4

#
Roshan123 wrote...
But how to use /u2b07
Actually, it should be a backslash, as "\u2b07" or "\u2193". Use in quotes as shown to include the represented character within a string. So:
//
getBackground().drawImage( new GreenfootImage( "Press the run button below \u2193",  24, Color.BLACK, new Color(0, 0, 0, 0)),  500, 500);
You need to login to post a reply.
1
2