‘Java’ 分类的存档
大概想了想几个方面jspservletstruts1.2hibernate3.1spring2.5貌似就学了这些总结一些 让自己更清醒的认识一下真的是太忙了 希望能有时间
import java.sql.Connection;import java.sql.DriverManager;import java.sql.SQLException;
package s1java.xmal1;
public class Map { int[] map = new int[100]; //对战地图 int[] luckyTurn = {6, 23, 40, 55, 69, 83}; //幸运轮盘 int[] landMine = {5, 13, 17, 33, 38, 50, 64, 80, 94}; //地雷位置 int[] pause = {9, 27, 60, 93}; [...]
/** * 4月7日 字符串和带参数的方法 * 定义字符串 * String a=””; * String a=new String(“”); * * 字符串连接 * 1.使用“+” * 2.使用concat(”连接字符串”)方法 * * 字符串搜索 * indexOf //从前向后 * lastIndexOf//从后向前 * 找不到返回值为1 * * 字符创提取 * substring(int a) 提取从a索引到最后的字符 * substring(int a,int b)提取从a到b之间的字符 * a下标从0开始算起 b下标从1开始算起 * * 字符串.tram(); *去掉字符串中的空格 * *带参数的方法 [...]
package cq;import java.util.*;/** * 猜拳游戏 * 玩家类 * @author Richie * */public class Person { String name=”匿名”; //玩家名称 int score;//玩家积分》赢的次数 Scanner input =new Scanner(System.in);
public int showFist(){ System.out.print(“请出拳(1.剪刀 2.石头 3.布):”); int choose =input.nextInt();
if(choose==1){ System.out.println(“你出:剪刀”); [...]
