老师设置了优先级队列为什么不按队列顺序来呀,我生产消息的时候就是一个for循环从1-10,为甚么出现这种情况。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .container { width: 1400px; margin: 0 auto; background-color: aqua; } .header { height: 80px; background-color: #abcdef; } .nav { margin-top: 10px; height: 80px; background-color: #adadad; } .main { width: 600px; margin-top: 10px; background-color: #aaac; } .left{ float: left; width: 900px; height: 600px; background-color: #abcdef; } .right{ float: right; width: 480px; height: 600px; background-color: #abcdcc; } </style> </head> <body> <div class="container"> <div class="header">网站头部</div> <div class="nav">网站导航</div> <div class="main"> <div class="left">主要内容</div> <div class="right">侧边栏</div> </div> <div class="footer">网站底部</div> </div> </body> </html>
老师我侧边栏过不去啊
老师项目路径怎么配呢?之前在servlet的时候是http://localhost:8080/servletdemo/hello.do,
现在用maven访问少了一个项目路径
http://localhost:8080/hello.do
为什么在db.properties中写数据库驱动呢?maven会帮忙加载驱动吗?还有jdbc.url为什么是三条杠?
老师这个i是哪里来的,创建线程的时候没有传递参数呀。
老师 这里为什么设计y=30和50?变化的不是x的值吗?、
老师,为啥我使用接口后,这个线程名没有修改成功喃?
package DemoThread; //线程同步现象 class Acount{ private String accountNo; private double balance; public Acount(String accountNo, double balance) { this.accountNo = accountNo; this.balance = balance; } public Acount() { } public String getAccountNo() { return accountNo; } public void setAccountNo(String accountNo) { this.accountNo = accountNo; } public double getBalance() { return balance; } public void setBalance(double balance) { this.balance = balance; } } class DrawThread implements Runnable{ private Acount acount; private double drawMoney; public DrawThread() { } public DrawThread(String name, Acount acount, double drawMoney) { new Thread().setName(name); this.acount=acount; this.drawMoney=drawMoney; } @Override public void run() { if(this.acount.getBalance()>=this.drawMoney){ System.out.println(Thread.currentThread().getName()+" 取钱成功! 吐出钞票:"+this.drawMoney); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } this.acount.setBalance(this.acount.getBalance()-this.drawMoney); System.out.println("\t 余额为:"+this.acount.getBalance()); }else { System.out.println(Thread.currentThread().getName()+" 取钱失败,余额不足"); } } } public class DrawMoneyThreadTest { public static void main(String[] args) { Acount acount=new Acount("1234",1000); new Thread(new DrawThread("老公",acount,800)).start(); new Thread(new DrawThread("老婆",acount,800)).start(); } }
同样的结果写法区别好大?不这样写就报错
老师,这个练习中this和 this.account有什么具体的区别吗
老师,我的坦克跑起来飞快,点一下就从一端飞到另一端的尽头,停不下来。代码也是按照老师要求的改成0.02,为什么还是超快呢?
老师,能再说明一下这个level+1吗?想不明白
老师,这两钟输出的结果是一样,我可以用我注释掉的那种吗
com.panda.xmlorg.jsoup.Jsouporg.jsoup.nodes.Documentorg.jsoup.nodes.Elementorg.jsoup.select.Elementsjava.io.IOExceptionjava.net.MalformedURLExceptionjava.net.URLGrawlDemo StringargsIOException i=i<=i++Document document = Jsoup.URL+iSystem..printlndocumentElements headerImgEle = document.getElementsByAttributeValueElements headerEle = document.selectElements authorEle = document.selectElements contentEle = document.selectString headerImg = headerImgEle.get.attrString header = headerEle.textString author = authorEle.textString content = contentEle.textSystem..printlnheaderImgSystem..printlnheaderSystem..printlnauthorSystem..printlncontent
老师,这个编译后还存在标签和报错Exception in thread "main" org.jsoup.HttpStatusException: HTTP error fetching URL. Status=404, URL=https://daily.zhihu.com/story/9747249 at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:760) at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:706) at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:299) at org.jsoup.helper.HttpConnection.get(HttpConnection.java:288) at org.jsoup.Jsoup.parse(Jsoup.java:183) at com.panda.xml.GrawlDemo.main(GrawlDemo.java:17)
这不是两个吗?为啥还能用this?
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637