- 3
- 0
- 约5.82千字
- 约 48页
- 2018-08-12 发布于江苏
- 举报
暑假总结(200.08.26)
暑假学习总结 哈尔滨工程大学 计算机 王彬 S310060008 2010.08.26 学习过程 (1)2010.07.11—2010.07.17 复习java基础知识。 (2)2010.07.18—2010.07.24 复习网站基础知识(Jsp,html,css,Ajax) (3)2010.07.25—2010.08.17 看“题库”代码,后期写题库文档,学习SSH中的Struts部分 (4)2010.08.18—2010.08.31 修改“题库”中的数据库,学习Hibernate,Spring部分。 晚上学习 C语言(2010.08.25结束) java基础知识 (1)基本数据类型和基本操作 Eclipse:ctrl+shift+/ 注释快捷键 命名习惯(java没有长度限制): 变量 类名 方法 常量 (我习惯使用:匈牙利命名法) java基础知识 (2)控制语句 If…… If…...else If…… else if…. 注意: If Switch (能用Switch就不用if) java基础知识 For While 转换 (时间复杂度) java基础知识 (3)方法 Static: 如:Math.sin(Math.PI/6) ------0.5 递归: Public int countZero(int m){ if(m/5==0){ return 0; }else{ return m/5+countZero(m/5); } } java基础知识 (4)数组 Int [] a=new int[10]; a.length Java.util.Arrays.sort() java.util.Arrays.binarySearch(a,2) java基础知识 (5)对象和类 Public class Student{ int studentId; Public Animal(){} public Animal(int studentId){ this.studentId=studentId; } } Student s1=new Student(); Student s2=new Student(122); java基础知识 (6)字符串 String s3=“aa”+”bb”; s3.contact(“cc”); pareto(s2); toLowerCase(); toUpperCase(); trime(); replace(“d”,”D”); replaceFirst(“d”,”D”); indexOf(“d”); indexOf(String str,int fromIndex); lastIndexOf(String str,int endIndex); java基础知识 (7)继承和多态 java基础知识 (8)抽象类和接口 Abstract class: Public abstract class Geom{ public abstract double findArea(); public abstract double findPerimeter(); } Public class Circle extends Geom{ public double findArea(){}//面积 public double findPerimeter(){}//周长 } java基础知识 Interface: Public interface Comparable{ public int compareTo(Object o); } Public class Rectangle implements Comparable{ double area; public double findArea(){return area;} pubic int compareTo(Object o){ if(this.findArea()((Rectangle)o).findArea()) return 1; else retrun 0; } } java基础知识 (9)图形用户界面程序设计入门 JFrame Jpanel 布局管理器: FlowLayout GridLayout BorderLayout 颜色:Color :public Color(int r,int g,int b) 字体:Font: public Font(String name,int style,int size) java基础知识 (10)事件驱动程序 ActionEvent AdjustmentEvent CompoentEvent (FouseEven
您可能关注的文档
最近下载
- 马科动物运动性骨折的手术治疗与运动康复.docx VIP
- 温州市2026届高三(一模)语文试卷(含官方答案解析).pdf
- 部编版(26春)小学语文一年级下册教学设计全册.docx VIP
- 2023-2024年度广东省职业院校技能大赛药品生产赛项规程 .pdf VIP
- 空中交通管理基础全套教学课件.pptx VIP
- 大酒店承包合同(标准版).doc VIP
- 2024年天津市红桥区中考数学一模试卷(含解析).pdf VIP
- 《船舶电气与自动化(船舶电气)(大管轮)》_船舶电气(大管轮)第六章.pptx VIP
- 《船舶电气与自动化(船舶电气)(大管轮)》_船舶电气(大管轮)第五章.pptx VIP
- T_CCTAS 220-2025 零碳港口评价技术规范.pdf VIP
原创力文档

文档评论(0)