zoukankan      html  css  js  c++  java
  • 约定俗成命名规则

    约定俗成的命名规则

     


      类名的首字母大写

      变量名和方法名的首字母小写

      运用驼峰标识

      [源码]


    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    public class Dog {
        static int furColor;
        float height;
        float weight;
         
        void catchMouse(Mouse m) {
            //as;dfj;asdf
            //asdfj;asf
            //m.scream();
        }
         
        public static void main(String[] args) {
            //int i;
            System.out.println(furColor);
            Dog d = new Dog();
            Mouse m = new Mouse();
            d.catchMouse(m);
            HelloWorld hw = new HelloWorld();
        }
    }
     
    class Mouse {
        int height;
    }

     

    点击链接查看详细内容

  • 相关阅读:
    第四次作业
    第三次作业
    作业,11
    作业,10
    作业,9
    作业,8
    作业,7
    作业,6
    作业,5
    作业,4
  • 原文地址:https://www.cnblogs.com/hane/p/7356101.html
Copyright © 2011-2022 走看看