还有就代码中是把3赋给了a,那a又是什么呢?
老师,请问:我在赋值之前,这个内存块是否就已经是设定好了类型:Int,地址:1531372336 呢?
为啥Java io流中,close() 要在对象不等于null时关闭
源代码:
package com.bjsxt.object; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; /** * 对象流 * @author 侯超飞 * */ public class test { public static void main(String[] args) { ObjectOutputStream oos = null; try { oos = new ObjectOutputStream(new FileOutputStream("G:\\java\\ata.txt")); oos.writeUTF("你好!"); oos.writeObject(new Person("哈哈",20)); oos.writeInt(123); oos.writeDouble(12.0); oos.flush(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally { try { if(oos!=null) //为啥要不等于null oos.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
如何让aside不自动换行呢?
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style> header{ height: 100px; width:100%; background-color: red; } nav{ height:40px; width:100%; background-color: pink; } article{ height:475px; width:60%; background-color: yellow; position:relative; left:0px; } section{ height:400px; width:90%; background-color: peru; position:relative; left:30px; top:30px; } aside{ height:475px; width:40%; background-color: red; position:relative; left:60%; top:0px; } footer{ height:100px; width:100%; background-color: pink; } </style> </head> <body> <header></header> <nav></nav> <article> <section></section> </article> <aside></aside> <footer></footer> </body> </html>
老师,other.name是哪来的,只有self.name被定义了,other.name并没有被定义啊,为什么可以直接用
打开init说明文件时显示可以编辑,那是不是可以直接在init里重写方法即时生效?还是说只能在当前面板重写?
MAX_SPEED = 111 >>> print(MAX_SPEED) 111 >>> a = MAX_SPEED >>> print(a) 111
如上,讲常量赋值给变量,此时MAX_SPEED为变量还是常量?如何定义/
方框标注的三个地方,不能一次执行,否则报错。必须一次执行一个才行,这是啥原因呢?
老师我检查了几遍代码,数据也写进去了,文件路径也对,就是读不出来是怎么回事
跟着视频敲的,怎么还会报错呢?
老师,这道题怎么做。。。要用到递推函数吗。
老师,无法添加依赖dubbo,在本地仓库没有相应的jar包。
[INFO] Scanning for projects... [INFO] [INFO] -------------------< com.wjf:01-dubbo-provider-demo >------------------- [INFO] Building 01-dubbo-provider-demo 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] Downloading from nexus-aliyun: http://maven.aliyun.com/nexus/content/groups/public/com/alibaba/dubbo/2.6.7/dubbo-2.6.7.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.109 s [INFO] Finished at: 2019-11-23T22:16:15+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project 01-dubbo-provider-demo: Could not resolve dependencies for project com.wjf:01-dubbo-provider-demo:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at com.alibaba:dubbo:jar:2.6.7: Failed to read artifact descriptor for com.alibaba:dubbo:jar:2.6.7: Could not transfer artifact com.alibaba:dubbo:pom:2.6.7 from/to nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public): proxy.host.net -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
我编写的起始点到终点的距离最后没有结果输出,是那有问题吗?
2.程序如下:
#导入海龟绘图
import turtle
#导入开方模块
import math
#定义多点坐标,绘制折线,计算起始点到终点距离
#定义多个点
x1,y1=100,100
x2,y2=100,-100
x3,y3=-100,-100
x4,y4=-100,100
#绘制折线
turtle.penup()
turtle.goto(x1,y1)
turtle.pendown()
turtle.goto(x2,y2)
turtle.goto(x3,y3)
turtle.goto(x4,y4)
#计算起点到终点距离
distance=math.sqrt((x1-x4)**2+(y1-y4)**2)
turtle.write=(distance)
3.截图如下:
为什么我执行代码没有反应,修改成和老师的一样也没用,这是什么情况
老师,现在用的都是win10了,能不能加一个win10的,谢谢
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637