Basic Knowlege points:

1: it's necessary that there is only one public class in per .java file

2: .java file name should better to same as class name

3: when set the environment variable CLASSPATH, you should make sure the '.' path can't be lack of.

4: java is case sensitive, including .java file name , class name, variable name, method name and so on.

5: JVM uses automatic garbage collection machanism. It just collects memory source, not contains physical source, such as database connection, disk IO. You can invoke a collection through call static method System.gc().

6:Java is strong-type language, the variable shouble be declared firstly and then you can use it. ② the vairable only can accept the value which type is consistent with itself.

7: /**   */  is used to add document annotation for java. javadoc command can export the code API document.

8: use '...' follow method parameter type, means has at least one parameter or more parameter. It equals type array type[]. it's similar with params in C#

9. In java, lamda expression use '->' symbol

10. From java 7, switch statement was allow to use String type, before just includes byte, int, char, shot four type.

11.For java, object instance can access the class static method or static field. but in c#, That's illegal.

12. For java, the package is similar with namespace in c#

13. for classes they belongs to same packege, don't have to at the same directory. That means there can be several packages with same name, but these packages should at different directory. And .class file should at the directory which name is same with its package name.

14. in java, 'instanceof' keyword equals 'is' in C#; there isn't  keyword like as 'as'.

15. In Java, support initialization block , don't in c#.

public class A

{

{ ... block }

}

note: the execute order is that: create class object, initialize block, initialize field, constructor

if all class object have same logic, or initialize code, we can use static initialization block

16. In java, final keyword is same as sealed in c#.

17. the relationship of basic type with their packaged class

when convert between basic type with packaged class, system will boxing or unboxing automatically.

18. for value type and reference type which are defined by 'final' keyword', difference is following:

1. final value type can't be changed or modified anymore.

2. final reference type' reference which is pointer address is can't changed, but the object fields can be modified or changed.

Note: it's same as 'readonly' key word and 'const' key word in c#.

19. Object reference:

1. StrongReference ---- when system collect garbage, the object will not be recycled.

2. WeakReference ---- when system collect garbage, the object will be recycled compulsively.

3. PhatomReference  -----  the object will be recycled compulsively. it can't get object address reference use PhatomReference. it just to use to trace the object.

4.SoftReference   ------ when system collect garbage,  if the memory is not enough , the object will be recycled compulsively.

Note: it's alse same as WeakReference in c#

Java learning notes (1):Basic Knowlege points的更多相关文章

  1. Mybatis Learning Notes 1

    Mybatis Learning Notes 主要的参考是博客园竹山一叶的Blog,这里记录的是自己补充的内容 实体类属性名和数据库不一致的处理 如果是实体类的结果和真正的数据库的column的名称不 ...

  2. rt-thread learning notes

    rt-thread learning notes 2018-01-15 > 001 具有相同优先级的线程,每个线程的时间片大小都可以在初始化或创建该线程时指定 rt_thread_t rt_th ...

  3. Java Learning Path(四) 方法篇

    Java Learning Path(四) 方法篇 Java作为一门编程语言,最好的学习方法就是写代码.当你学习一个类以后,你就可以自己写个简单的例子程序来运行一下,看看有什么结果,然后再多调用几个类 ...

  4. Java Learning Path(五)资源篇

    Java Learning Path(五)资源篇 1. http://java.sun.com/ (英文) Sun的Java网站,是一个应该经常去看的地方.不用多说. 2.http://www-900 ...

  5. Java Learning Path(三)过程篇

    Java Learning Path(三)过程篇 每个人的学习方法是不同的,一个人的方法不见得适合另一个人,我只能是谈自己的学习方法.因为我学习Java是完全自学的,从来没有问过别人,所以学习的过程基 ...

  6. Java Learning 001 新建一个Java工程 HelloWorld程序

    Java Learning 001 新建一个Java工程 HelloWorld程序 Step 1 . 在Eclipse 软件里,点击: File -> New -> Java Projec ...

  7. Java Learning 000 搭建开发环境

    Java Learning 000 搭建开发环境 你需要两个软件: * JDK (Java Develop Kit :Java开发工具包) * eclipse (eclipse 集成开发环境软件) 安 ...

  8. Rust learning notes

    Rust learning notes Rust Version 1.42.0 $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs ...

  9. Coursera, Machine Learning, notes

      Basic theory (i) Supervised learning (parametric/non-parametric algorithms, support vector machine ...

随机推荐

  1. 2014.3.11-C语言学习小结

    文件操作: 知识点: 持久化 1.文本文件的读写 2.二进制文件的读写 3.缓冲文件系统 1.打开文件 2.读写文件 3.保存 4.关闭文件 ============================= ...

  2. test maekdown 2

    Package Control Messages Markdown Preview: Sublime Text 2/3 Markdown Preview ======================= ...

  3. 一个简单的Garbage Collector的实现

    一个简单的Garbage Collector的实现 前言: 最近看了google的工程师写的一个非常简单的垃圾收集器,大概200多行C代码,感叹大牛总能够把复杂的东西通过很简单的语言和代码表达出来.为 ...

  4. Coursera台大机器学习基础课程1

    Coursera台大机器学习基础课程学习笔记 -- 1 最近在跟台大的这个课程,觉得不错,想把学习笔记发出来跟大家分享下,有错误希望大家指正. 一 机器学习是什么? 感觉和 Tom M. Mitche ...

  5. iOS制作Static Library(静态库),实现多工程的连编

    在iOS开发中,我们会发现一些偏底层或基础代码是直接可以复用的,当我们换一个项目,改变的只需要是偏上层的业务逻辑代码,所以我们可以把这部分基础代码制作为一个静态库static library,并不断扩 ...

  6. 企业架构研究总结(34)——TOGAF架构内容框架之架构制品(下)

    4.2.31 数据生命周期图(Data Lifecycle Diagram) 数据生命周期图是在业务流程的约束之下对业务数据在其整个生命周期(从概念阶段到最终退出)中对其进行管理的核心部分.数据从本质 ...

  7. Python远程视频监控

    Python远程视频监控程序   老板由于事务繁忙无法经常亲临教研室,于是让我搞个监控系统,让他在办公室就能看到教研室来了多少人.o(>﹏<)o||| 最初我的想法是直接去网上下个软件,可 ...

  8. 向输出到console的文字加样式

    Chrome 控制台新玩法-向输出到console的文字加样式   有兴趣的同学可以文章最后的代码复制贴到控制台玩玩. Go for Code 在正常模式下,一般只能向console 控制台输出简单的 ...

  9. EasyUI 1.3.6 DateBox添加清空按钮

    EasyUI 1.3.6 DateBox添加清空按钮 效果如图: EasyUI datebox是没有清空按钮的,可通过如下方法加入: 打开jquery.easyui.min.js看到这样如此乱的代码, ...

  10. 玩下Javascript

    玩下Javascript 前言 好久没有更新博客了,也蛮少捣弄javascript,今儿看到一个题目,关于给你一个面板,你可以随意的在上面画矩形,可以移动和删除任意一个你创建的矩形,心血来潮搞着玩哈, ...