1.javaç®åçå书系ç»
2.乱舞三国ol汉风版赌场java代码是源a游永恒传奇世界h5源码什么
3.JAVA çµå½±ç±»
4.å¸çä¸å½å¨çµèä¸ç© è¦å®è£
JAVA JDK
javaç®åçå书系ç»
HashMapç常ç¨æ¹æ³mapçåå¨åä¿®æ¹æ¹å¼ map.put(key, value);
mapæ¯å¦å å«æ个å ç´ map.containsKey(key);
mapæ个keyçvalueå¼map.get(key);
åè代ç
import java.util.HashMap;public class BookTest {
static HashMap<String, Integer> map=new HashMap<String, Integer>();
static{ //åå§åå¾ä¹¦ä¿¡æ¯
map.put("ä¸å½å¿", 8);
map.put("红楼梦", 0);
map.put("西游记", );
}
public static void main(String[] args) { //mainæ¹æ³
jieShu("æ°´æµ");
jieShu("ä¸å½å¿");
huanShu("ä¸å½å¿");
jieShu("红楼梦");
huanShu("红楼梦");
jieShu("红楼梦");
}
public static void jieShu(String name){ //å书
if(!map.containsKey(name)){ //æ¥è¯¢å¾ä¹¦é¦æ¯å¦æè¿æ¬ä¹¦
System.out.println("书ç±ï¼"+name+"\tæ¥æ æ¤ä¹¦ï¼");
return;
}
if(map.get(name)<=0){ //æ¥è¯¢å¾ä¹¦æ°éæ¯å¦ä¸º0
System.out.println("书ç±ï¼"+name+"\tå·²å ¨é¨ååºï¼è¯·ææ¥å¨æ¥");
return;
}
map.put(name, map.get(name)-1);
System.out.println("书ç±ï¼"+name+"\tå书æåã"+"\tåºåï¼"+map.get(name));
}
public static void huanShu(String name){ //è¿ä¹¦
if(!map.containsKey(name)){
System.out.println("æ¥æ æ¤ä¹¦");
}else{
map.put(name, map.get(name)+1);
System.out.println("书ç±ï¼"+name+"\tè¿ä¹¦æåã"+"\tåºåï¼"+map.get(name));
}
}
}
æµè¯è¾åº
书ç±ï¼æ°´æµ æ¥æ æ¤ä¹¦ï¼ä¹¦ç±ï¼ä¸å½å¿ å书æåã åºåï¼7
书ç±ï¼ä¸å½å¿ è¿ä¹¦æåã åºåï¼8
书ç±ï¼çº¢æ¥¼æ¢¦ å·²å ¨é¨ååºï¼è¯·ææ¥å¨æ¥
书ç±ï¼çº¢æ¥¼æ¢¦ è¿ä¹¦æåã åºåï¼1
书ç±ï¼çº¢æ¥¼æ¢¦ å书æåã åºåï¼0
乱舞三国ol汉风版赌场java代码是什么
package zl.study.designpattern.bridge;
public class TextWindow extends Window {
private String content;
public TextWindow(String content ){
this.content = content;
}
@Override
public void drawContent() {
getWindowImp().deviceText(content, new Point(,));
}
}
JAVA çµå½±ç±»
æ ¹æ®éè¦äºå°±æ¯äº
public class Movie{
private String name;
private String director;
Sprivate String tarring;
Moive(String name,String director,String tarring)
{
this.name=name;
this.director =director;
this.tarring =tarring;
}
static public void main(Stirng[] str){
Moive m=new Moive("ä¸å½æ¼ä¹","å¼ çºªä¸","åå½å¼º");
}
}
å¸çä¸å½å¨çµèä¸ç© è¦å®è£ JAVA JDK
JDKæ¯JAVAçç¨åºå¼åå ï¼å æ¬è¿è¡JAVAç¨åºçèææºï¼ï¼ä½ 说ç游æåºè¯¥æ¯åºäºJAVAå¼åç游æï¼JAVAçç¨åºåªè½å¨JAVAèææºä¸è·ï¼æ以è¦å®è£ JDKãå°ä¸é¢çå°åä¸è½½å®è£ å°±è¡äºã
/otn-pub/java/jdk/7u3-b/jdk-7u3-windows-i.exe