【初心者】Java質問・相談スレ6【大歓迎】
■ このスレッドは過去ログ倉庫に格納されています
0692デフォルトの名無しさん
NGNG2日もかかりますか…
俺も >>688 の意見に賛成だね。
もっとも小学生だとそんぐらい掛かるかもしれない。
String str = "ABCDE";
str.endsWith( 'A' );//偽
str.endsWith( 'B' );//偽
str.endsWith( 'C' );//偽
str.endsWith( 'D' );//偽
str.endsWith( 'E' );//真
String str = "漢字文字列";
byte[] sjis = str.getBytes("Shift_JIS");
byte[] euc = str.getBytes("EUC_JP");
byte[] def = str.getBytes();
for( int i = 0 ; i < sjis.length ; i++ )
System.out.print( Integer.toHexString( sjis[i] & 0xFF ) + "," );
System.out.println();
for( int i = 0 ; i < euc.length ; i++ )
System.out.print( Integer.toHexString( euc[i] & 0xFF ) + "," );
System.out.println();
for( int i = 0 ; i < def.length ; i++ )
System.out.print( Integer.toHexString( def[i] & 0xFF ) + "," );
■ このスレッドは過去ログ倉庫に格納されています