为啥啊,每次都是一个窗口,都是A窗口,就没有其他窗口买票
为什么不给Old lu 配个鼠标垫呢,,,
鼠标垫都不给old lu 配一个。真难过
department 表中 既有department_id 列也有department_name 列
第一种情况为啥是错了
问:Scanner使用hasNextLine实现输入内容,1、为什么光标不在“请输入直播列表:”后面 ,有什么方法可以让光标自动在后方提示吗 2、
代码
import java.util.Scanner; /** * next() 的使用 * @author yanglei * */ public class Test02 { public static void main(String[] args) { // 从键盘接收数据 Scanner scanner = new Scanner(System.in); System.out.println("请输入直播列表:"); // nextLine方式接收字符串 if(scanner.hasNextLine()) { //nextLine是下一行内容,用string变量来接收 String string = scanner.nextLine(); System.out.println(string+","); } } }
额外的咨询,谢谢
老师我写了一个简单的工具,用于实现数字用英文“,”逗号拼接
预期结果:键盘输入字符和 空格,直接用“,”号拼接好
期望获得的帮助:如何做一个页面工具,让其他不懂代码的同学使用
需要用什么开发?实现的思路是什么呢?
代码:
import java.util.Scanner; /** * 数字用,号拼接 * @author yanglei * */ public class Test01 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("请输入直播列表:"); //利用hasNextXXX()判断是否还有下一输入项 while (sc.hasNext()) { //利用nextXXX()方法输出内容 String str = sc.next(); System.out.print(str+","); } } }
MyTestPro.zip
希望老师给个方向知道啊
老师,我这是怎么回事,安装两遍都是这个错
老师,请问这里的add方法类型为什么是Object类型的
源码里面add方法的类型是Boolean的
老师为什么$(document)和$(this)不加引号?
老师请问下我哪里错了,我这个还需要重新设置吗??
老师,为什么结果不是正确的?
public class TestConstants { public static void mian(String[] args) { final double PI = 3.14159; //PI = 3.14; //常量不能被修改 double r = 3; double area = PI * r * r; double circle = 2 * PI * r; System.out.println("area= "+area); System.out.println("circle ="+circle); } }
截图:
我的这上面显示这个样,请问下老师是什么问题呢,怎么和你的不一样
已成功编译为class文件,但无法运行,老师,这是什么原因?
老师以上代码我理解的对吗?特别是红圈做记号的部分
老师我这样理解对吗?
public class TestThis { int a,b,c; //定义成员变量int类型a,b,c TestThis(int a,int b){//创建构造方法TestThis()内有形参a,b this.a=a; //this.a=a;=号左边的this.a是成员变量,右边a是局部变量,this的作用是用来区分这两个变量 this.b=b; } TestThis(int a,int b,int c){//重载TestThis构造方法 this(a,b); this.c=c; // } void sing(){ System.out.println("高老师在唱歌!!!"); } void eat(){ this.sing(); //调用本类中sing()方法,this可写可不写,不写也是默认调用普通方法sing() System.out.println("你妈妈喊你回家吃饭!"); } public static void main(String[] args){ TestThis hi = new TestThis(2,3); //创建TestThis对象取名为hi并给TestThis构造方法赋值(2,3) hi.eat(); //调用对象TestThis类中的eat方法 } }
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637