20145109 《Java实验报告1》
2024-08-28 18:37:54
Experiment Ⅰ ——getting familiar with JDK (Linux + Eclipse)
Content
1.Compile and run easy Java programs using JDK;
2.Edit, compile, run and debug in Eclipse.
Steps
Java in the terminal:
Running in the Idea:
Debug:
View variables at breakpoint:
Step into:
Step over:
Set breakpoint:
Problem & Solution
The demand is easy, while I had no idea about the way of encapsulation for the lack of experience. Our aim is to calculate all the prime from 1 to N, so it should be written as a method. So I new a class called 'Prime'. When I initialise the variable in the class, it turned out error. The assistant professor told me that all the operations should be written in Constructor or Method. Then I put the initialization in the Constructor. Problem solved!
step | time | percentage |
---|---|---|
demand analyse | 0 | 0% |
design | 20min | 30.76% |
code | 20min | 30.76% |
test | 20min | 30.76% |
summarize | 5min | 7.69% |
PS : code
最新文章
- MSSQL部分补丁的列表及下载地址(持续更新)
- textarea元素只设置高可变,宽固定
- asp.net4.5尚未在web服务器上注册 解决方案
- [Word]中批量修改图片大小和缩放比例方法
- DropDownList控件
- python中set集合
- 深入浅出WPF(1)—转(http://liutiemeng.blog.51cto.com/120361/91631/)
- pl/sql programming 15 数据提取
- 离线安装Android开发环境的方法
- Decimal
- poj 1011 Sticks (DFS+剪枝)
- android PopupWindow显示位置
- Android利用canvas画各种图形 及Paint用法 .
- Spring思维导图(MVC篇)
- Linux入门(6)——Ubuntu16.04安装atom
- java_IO流读取本地文件
- git 命令笔记
- java Swing小知识点
- android 性能优化 -- 启动过程 冷启动 热启动
- [javaSE] 网络编程(概述)
热门文章
- Chrome 新建自定义标签
- mysql 暴力破解 root账号密码
- win7物理主机与虚拟XP系统互相ping不通解决方法
- spring 项目升级到spring cloud记录 数据源配置
- sizeWithFont:方法使用明细
- PowerDesign 使用 用户自定义字段类型 domain 后 生成物理模型图 生成的sql脚本 类型 替换问题
- Poj3087
- 《从零开始学Swift》学习笔记(Day 62)——Core Foundation框架之内存托管对象与非托管对象
- JRE not compatible with workspace .class file compatibility: 1.7
- 理解PHP中会话控制