比较菜的问题 DataInputStream in = new DataInputStream(System.in);in.readInt(); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 DataInputStream in = new DataInputStream(System.in);in.readShort(); DataInputStream in = new DataInputStream(System.in)in.readShort() 大哥不行也!我试了一下,import java.io.DataInputStream;public class t { public static void main( String[] args ) { DataInputStream dis = new DataInputStream( System.in ); short s, j; try { System.out.print( "s? " ); s = dis.readShort(); System.out.print( "j? " ); j = dis.readShort(); System.out.println( "s = " + s + "j = " + j ); } catch ( Exception e ) { System.out.println( "an error occured" ); } } }结果不对啊! public String readConsole() throws Exception { // Create a buffered reader with System.in, then // read a line from it. BufferedReader breader; breader = new BufferedReader(new InputStreamReader(System.in)); return breader.readLine(); } what number did u input? 是不对我搞错了System.in读出都字符码 what number did u input? 帮忙,谢谢! 求助大神 讲下Java的入口函数 我用Java发送了一个带附件的邮件但是outlook上却看不见 java 怎么弹出yes or no 的对话框 线程同步问题,来的都给分 关于字符串加密的疑问 applet 问题。请高手指点! JBuilder爱好者请进 请问个泛型的问题 huangbrid就JDK配置的问题答谢各位参与和建议!flyzhen,yuechun,IMarksma,sonic616,erato,eyeieye,blackcats,awing_feeling,YANGJB 各位高手小弟现有java疑难问题请教,谢谢。
in.readShort();
in.readShort()
import java.io.DataInputStream;public class t {
public static void main( String[] args ) {
DataInputStream dis = new DataInputStream( System.in );
short s, j;
try {
System.out.print( "s? " );
s = dis.readShort();
System.out.print( "j? " );
j = dis.readShort();
System.out.println( "s = " + s + "j = " + j );
} catch ( Exception e ) {
System.out.println( "an error occured" );
}
}
}
结果不对啊!
{
// Create a buffered reader with System.in, then
// read a line from it.
BufferedReader breader;
breader = new BufferedReader(new InputStreamReader(System.in));
return breader.readLine();
}
我搞错了System.in读出都字符码