int 本书

2019年2月11日20:27:17 发表评论 901 views
/**
 * Created by xabcd on 2019/2/11.
 */
public class TestJava2_1
{
    public static void main(String args[])
    {
        int num;
        num = 3;
        System.out.println("这是数字"+num);
        System.out.println("我有"+num+"本书");
    }
}



将println改写成print 则打印结果不换行
这是数字3我有3本书

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: