随笔分类 -  Java 学习

摘要:设置Classpath的目的,在于告诉Java执行环境,在哪些目录下可以找到您所要执行的Java程序所需要的类或者包。 Java执行环境本身就是一个平台,执行于这个平台上的程序是已编译完成的Java程序(后面会介绍到Java程序编译完成之后,会以.class文件存在)。如果将Java执行环境比喻为操 阅读全文
posted @ 2022-04-26 21:46 易点灵通 阅读(394) 评论(0) 推荐(0)
摘要:If the case of a compile-time constant, the compiler is allowed to "fold" the constant value into any calculations in which it's used; that is, the ca 阅读全文
posted @ 2022-02-23 22:01 易点灵通 阅读(54) 评论(0) 推荐(0)
摘要:Inheritance doesn't just copy the interface of the base class. When you create an object of the derived class, it contains within it a subobject of th 阅读全文
posted @ 2022-02-19 23:08 易点灵通 阅读(54) 评论(0) 推荐(0)
摘要:You can create a main() for each one of your classes; this technique of putting a main() in each class allows easy testing for each class. Even if you 阅读全文
posted @ 2022-02-18 12:22 易点灵通 阅读(22) 评论(0) 推荐(0)
摘要:Access control is often referred to as implementation hiding. Wrapping data and methods within classes in combination with implemetation hiding is oft 阅读全文
posted @ 2022-02-17 11:20 易点灵通 阅读(42) 评论(0) 推荐(0)
摘要:If you created a new package and inherit from a class in another package, the only members you have access to are the public members of the original p 阅读全文
posted @ 2022-02-17 10:15 易点灵通 阅读(75) 评论(0) 推荐(0)
摘要:The private keyword means that no one can access the member except the class that contains that member, inside methods of that class. 阅读全文
posted @ 2022-02-16 13:19 易点灵通 阅读(94) 评论(0) 推荐(0)
摘要:Note that compiled code is often placed in a different directory than source code, but the path to the compiled code must still be found by the JVM us 阅读全文
posted @ 2022-02-16 11:53 易点灵通 阅读(45) 评论(0) 推荐(0)
摘要:静态主方法只能访问静态变量, 如果要访问动态变量,必须将变量实例化。 在JAVA程序中,除了主静态方法以及类方法之外,其他在该类下定义的实例变量、实例方法,在主类方法中调用时必须要将其实例化,就是要加上对象的引用。 Ordinarily, when you create a class you ar 阅读全文
posted @ 2022-02-14 22:46 易点灵通 阅读(45) 评论(0) 推荐(0)