zoukankan      html  css  js  c++  java
  • 20145109 《Java实验报告1》

    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

  • 相关阅读:
    String
    Map和Set
    js的栈与堆
    js的私有属性
    随便谈一谈原型
    前端页面优化提速
    nth-child和nth-of-type
    重复输出字符串
    闭包
    mongodb内嵌文档的查询
  • 原文地址:https://www.cnblogs.com/Christen/p/5373384.html
Copyright © 2011-2022 走看看