zoukankan      html  css  js  c++  java
  • java note

    java note
    1. Java main function must be public static void main(String[] args){}
    2. Class decorator can be public or null. example: public class Main{} or class Main{}
    3. Class name must be the same as file name (and one file only include one class at most), otherwise raise error can't find specific class when call specific class. example: Main.java file include public class Main{} or nothing.
    4. Abstract class: abstract classes are classes that contain one or more abstract methods which don’t have method bodies. example: in public abstract ClassAbstract(){} include method public abstract void methodAbstract();. another class inherit from it. example: public ClassInherit extends ClassAbstract, and implement the abstract method: public void methodAbastract(){ do something };.
    5. Interface class is a 100% abstract class (all method don't have method body). example: public interface InterfaceClass{ public abstract void AbstractOne(); public abstract void AbstractTwo();}. and implement class: class Impl implement InterfaceClass{ public void AbstractOne(){ do something }; }.

    main method: https://stackoverflow.com/questions/29276917/what-does-public-static-void-main-args-mean

    abstract class: https://stackoverflow.com/questions/6007089/how-and-when-to-use-an-abstract-class

    interface class: https://www.sitepoint.com/interface-and-inheritance-in-java-interface/

  • 相关阅读:
    asp.net中ashx文件如何调用session
    NetAdvantage webdatagrid 控件的一些属性
    .NET 配置文件简单使用
    Dictionary的遍历和修改
    利用html+ashx实现aspx的功能
    .ashx
    jQuery AJAX实现调用页面后台方法
    用JS实现AJAX
    WCF系列学习5天速成
    介绍一个小工具 Linqer
  • 原文地址:https://www.cnblogs.com/vickey-wu/p/8243211.html
Copyright © 2011-2022 走看看