(a,b){ =;
静态变量不允许被定义。
。 。
老师,这个原因是什么?
这里老师说的好像有点问题,Mybatis默认初始化是SLF4J。
其他都可以,唯独
这个不行
在例子5-11中,
在Person构造器中指setAge()方法,而在下面的Test2类中也只调用了setName和setAge,全程都没用到两个get方法,所以这里我比较疑惑,两个get方法到底是在哪里发挥了作用?
这一章讲的挺实用的,可以提供一下课件吗?
关于set,get方法,
public int getAge(){ return age; } public void setAge(int age){ this.age=age; }
为什么在get方法中,需要在方法名前加int,而在set方法名前,不需要加int?
from flask import Flask,request app = Flask(__name__) @app.route('/login',methods=['GET','POST']) def login(): if request.method == 'GET': return 'get请求成功' elif request.method == 'POST': return 'post请求成功' if __name__ == '_main_': app.run()
老师 为什么我这个没反应 一直是这个
老师,为什么我按视频里的格式敲的代码,打印的结果格式是这样的
老师你好:
我这里多显示了一个 typing.Hashsable 这个父类。
像我们之前说的,最高级的不应该是object这个吗?为什么object上边还有一个typing.Hashable?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>02_Ajax中post参数的传递</title> </head> <body> <h1>02_Ajax中post参数的传递</h1> name:<input type="text" id="name" /></body></br> passwd:<input type="password" id="pwd" /> </br> <input type="button" value="获取数据" onclick="sub()" /> <script> function sub(){ var name=document.getElementById("name").value var pwd=document.getElementById("pwd").value url='http://httpbin.org/get' params='name='+name+'&pwd='+pwd var xhr=new XMLHttpRequest() xhr.open('post',url) xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded') xhr.send(params) xhr.onload=function(){ console.log(xhr.responseText) } } </script> </body> </html>
老师 这个参数传递 是传递在哪里了 这个有什么作用 没有听明白
还有一个 这个表单数据跟之前都不一样 老师一直在讲这个 这个有什么用 为什么get跟post两个不一样
#encoding=utf-8 #测试echo #这个文件就是echo服务器 from socket import * udpSock=socket(AF_INET,SOCK_DGRAM) #绑定IP和端口号,IP是本机IP udpSock.bind(("",8585)) #recvData接收到的数据是一个元组,元组第一个数据是一个字节流数据 #元组的后一个数据是保留了发送方的IP和端口号 #1024是所能接收的最大字节数 while True: recvData=udpSock.recvfrom(1024) #因为已经是字节流数据了,都不需要encode()转码 udpSock.sendto(recvData[0],recvData[1]) udpSock.close()
#encoding=utf-8 #与test01共用 from socket import * s=socket(AF_INET,SOCK_DGRAM) s.bind(("",8788)) s.sendto(b"asd",("192。168.1.17",8585)) redata=s.recvfrom(1024) #decode()是解码的 print(redata[0].decode())
为什么我这个echo什么都没有返还
为什么我这个后面的udpSock.close()取消缩进就错,和while的内容一起缩进就没事
老师好,我自己在练习toString的时候写如下代码;
test { Person{ String } (String[] args) { Person p = Person()p.=p.=System..println(p)} }
在写第八行new Person();时候
idea体型必须吧Person类定义为静态,即第二行变成 static class Person{}才能运行。
因为之前讲到,静态是可以调用对象的,但反过来不可以,所以这里我不是很懂,psvm是静态方法,所以它去调用Person类(一个对象)应该没有问题,这里为什么会有问题呢?
而书中164页例5-5的结构:
class Person{ } public class Test{ psvm{ Person p = new Person(); } }
这里的Person又不需要定义static呢?谢谢
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637