摘要:
//map和list对应的是栈中存储的地址,final表示地址不能修改,但是地址对应的内存区域的值是可以修改的。所以在方法中参数是final修饰的,不会出错,因为地址没有改变。 //final:修饰符,表示终态的 public class Demo { public static void main 阅读全文
摘要:
public class Demo { public static void main(String[] args) { Set set = new HashSet();//定义set集合 set.add("haha");//向set中添加数据 set.add("hehe"); set.add("h 阅读全文
摘要:
//参数传递:1.如果参数是基本数据类型,方法中参数的值改了,方法外参数还是原来的参数// 2.如果参数是数组,方法中参数的值改了,方法外的参数值也改了 public class Demo { static int a = 10;//基本数据类型 static int [ ] b = {10};// 阅读全文
摘要:
//创建Servlet @WebServlet("/DownServlet") //注解public class DownServlet extends HttpServlet { private static final long serialVersionUID = 1L;public Down 阅读全文
摘要:
<body><form action=" " method="post"> <table border="1"> <tr> <td>学生编号</td><td><input type="text" name="id"></td> </tr> <tr> <td>学生姓名</td><td><input t 阅读全文
摘要:
--oracle--关系数据库中有三种方式:一对一,一对多, 多对多--SQL语句分类:--DQL(数据查询语言):select--DML(数据操作语言):insert/update/delete/merge--DDL(数据定义语言):create/alert/drop/truncate--DCL( 阅读全文
摘要:
public static void main(String[] args) { /*写有n个人围成一圈,顺序排号,从第一个人开始报数(从1~3报数), * 凡报到3的人退出圈子,问最后留下的人原来排在第几号。 */ int n = 8;//一共有8个人 boolean[] arr = new bo 阅读全文
摘要:
1,使用post方式提交的时候,如何处理中文乱码? request.setCharacterEncoding(“UTF-8”);//注意UTF大写 2,使用get方式提交的时候,如何处理中文乱码 String newname=new String(request.getParameter(“user 阅读全文
摘要:
public static void main(String[] args) { // 输入10个整数存入数组中,然后把他们从小到大排列并放在同一数组中 int[] arr = { 1, 2, 3, 5, 9, 10, 15, 20, 13, 14 };//向数组中输入无序的10个整数 int a 阅读全文
摘要:
public static void main(String[] args) { //输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数。 String str="ABab哈哈 123,"; int letter=0;//字母 int space=0;//空格 int number=0 阅读全文