• 20131028


      学习了Oracle sql排序 select A,COUNT(1) NB FROM A order by nb desc;

    拼SQL  select ‘truncate table ads.‘||a.tablename||’;' FROM ALL_TABLES A;

      学习了Java

    如何从一个蓝色带连接按钮,跳转到另一个页面。 类似于<li><a HREF="workingPlatform.do?action=toMyApplyPage">我发起的申请</a></li>

    通过XML找到Controller层 再到dao层。

    一维数组,二维数组 foreach使用,可变变量的传入参数。

    public static void fun(int...arg){
    for(int x:arg){
    System.out.print(arg);
    }
    System.out.println();
    }

    类的图形化表示

    类的名称

    类的属性

    方法

    类与对象的关系

    类是对象的模版,对象是类的实现。

    对象的产生格式

    分匹配空间 new

    封装属性

    private get/set

    构造方法。无参有参。

    作业:  定义学生类 属性 方法。

    代码:

    package com.hdy;


    class Student{
    private String name;
    private int age;
    private float english;
    private float math;
    private float chinese;
    public Student(){};
    public Student(String n,int a,float e,float m,float c){
    this.setAge(a);
    this.setChinese(c);
    this.setEnglish(e);
    this.setMath(m);
    this.setName(n);
    };
    public float sum(){
    return english+math+chinese;
    }
    public float avg(){
    return this.sum()/3;
    }
    public float max(){
    float max=english>math?english:math;
    max=max>chinese?max:chinese;
    return max;

    }
    public String info(){
    return "姓名:"+this.getName();
    }

    public String getName() {
    return name;
    }
    public void setName(String name) {
    this.name = name;
    }
    public int getAge() {
    return age;
    }
    public void setAge(int age) {
    this.age = age;
    }
    public float getEnglish() {
    return english;
    }
    public void setEnglish(float english) {
    this.english = english;
    }
    public float getMath() {
    return math;
    }
    public void setMath(float math) {
    this.math = math;
    }
    public float getChinese() {
    return chinese;
    }
    public void setChinese(float chinese) {
    this.chinese = chinese;
    }

    }
    public class Studenttest {
    public static void main(String args){
    Student stu =new Student("臧三",12,90.0f,11.0f,43.0f);
    System.out.print("总和为" + stu.sum());
    System.out.print(stu.info());

    }

    }

  • 相关阅读:
    Jmeter性能测试 入门
    线程模型——什么是线程池、以及怎样正确地配置线程池
    在Spring Bean的生命周期中各方法的执行顺序
    @Autowired @Qualifier
    @Autowired还可以注入List和Map
    springcloud ribbon的 @LoadBalanced注解
    CAS实现SSO 单点登录
    Docker 概念-2
    你的JavaBean是否真的需要实现Serializable
    基于django的会议室预订系统
  • 原文地址:https://www.cnblogs.com/huodongyang/p/3392940.html
Copyright © 2020-2023  润新知