博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Getting Started with Java
阅读量:6564 次
发布时间:2019-06-24

本文共 3939 字,大约阅读时间需要 13 分钟。

“学前”说明:《Learn Java for Android》这本书内容很多,都是精华,建议大家看英文版的。在这里我不打算一一总结书中的内容,书中每章节后面的exercises都很好,非常有总结性,而且在这些习题后面还有精华的Summary,所以,我就列举下每章exercises的内容(含参考答案)以及个人根据Summary提炼的一些内容(个人觉得比较重要的可能会另外写多点)。写Blog的过程,就是我学习&温故知新的过程(一律采用英文哦,顺便学下professional English *^__^*)。下面开始:

Chapter One :Getting Started with Java

  • Exercises:

  1.What is Java?

  Java is a language and a platform.The language is partly patterned after the C and C++ languages to shorten the learning curve for C/C++ developers.The platform consists of a virtual machine and associated execution environment.

  2.What is a virtual machine?(VM)

  A virtua machine is a software-based processor that presents its own instruction set.

  3.What is the purpose of the Java compiler?

  The purpose of the Java compiler is to translate source code into instuctions(annd associated data) that are executed by virtual machine(VM).

  4.True or false:A classfile's introductions are commonly referred to as bytecode.    (True)

  5.What does the virtual machine's interpreter do when it learns that a sequence of bytecode instructions is being executed repeatedly?

  It informs the VM's Just in Time(JIT) compiler to compile these instructions into native code.

  6.How does the Java platform promote portability?

  By providing an abstraction over the underlying platform.Thus,the source code is compiled once,but run everywhere.

  7.How does the Java platform promote security?

  By providing a secure environment in which code executes.It accomplishes this task in part by using a bytecode verifier to make sure that the classfile's bytecode is valid.

  8.True or false: Java SE is the Java platform for developing servlets.

  False.Java SE is the platform for developing apps and applets.

  9.what is the JRE?

  Jre implements the Java SE platform and makes it possible to run Java programs.

  10.What is the difference between the public and private JREs?

  The public Jre exists apart from the JDK,whereas the private Jre is a component of the JDk that makes it possible to run Java programs independently of whether or not the public Jre is installed.

  11.What is the JDK?

  The JDk provides development tools(including a compiler) for developing Java program.It also provides a private Jre for running these programs.

  12.Which JDK tool is used to complie Java source code?

  javac tool

  13.Which JDK tool is used to run Java applications?

  java tool

  14.What is Standard I/O?

  Standard I/O is mechanism consisting of standard input,standard output and standard error that makes it possible to read text from different sources(Keyboard or file),write nonerror text to different destinations(screen or file),and write error text to different destinations(screen or file).

  15.How do you specify the main() method's header?

      public static void main(String[] args),you can learn further from .

  • Summary:

  Java is a language and a platform.The platform consists of a virtual machine & associated execution environment.

  Developers use different editions of the Java platform to create Java programs that run on desktop computers,web browser,web servers,

  mobile information devices and embedded devices.These editions are known as Java SE,Java EE,and Java ME. Of course,there is another google-created edition:Android that presents a Dalvik virtual machine running on a modified Linux kernel.

  The public JRE implements the Java SE platform and makes it possible to run Java programs.The JDK provides tools (including Java compiler)for developing Java programs and also includes a private copy of the JRE.

  two APIs:1)standard class library APIs from Oracle(or Sun?); 2)Android-oriented standard class library APIs from Google;

  JDK tools is not recommended for large project,so we need IDE,like Eclipse,Intellij IDEA...

 

Next chapter introduce Java fundamentals including comments,identifiers,types,variables,expressions,statements...

 

 

转载于:https://www.cnblogs.com/allenpengyu/p/3577357.html

你可能感兴趣的文章
Java内存块说明
查看>>
List集合具体对象的特点
查看>>
网络信息安全之防火墙***检测方法 (五)
查看>>
怎样为用户写“招标书”
查看>>
1.7 文件目录管理及相关的命令使用方法
查看>>
PDF中添加页面/合并 PDF 内容
查看>>
JS仿FLASH特效可跳转回首页的CSS二级联动菜单
查看>>
页面导入样式时,使用link和@import有什么区别?
查看>>
类成员与类的实例成员
查看>>
Spark源码编译并在YARN上运行WordCount实例
查看>>
Spring AOP + AspectJ annotation example
查看>>
Spring VS EJB 3 的若干认识误区(转)
查看>>
React.js初探(一)
查看>>
Neo4j CQL -(17)- NULL值
查看>>
BZOJ4554: [Tjoi2016&Heoi2016]游戏 luoguP2825 loj2057
查看>>
json_encode后的中文不编码成unicode
查看>>
修改纵断面图标注栏
查看>>
Flex创建带有空间信息的椭圆(Polygon)
查看>>
【转】参照protobuf,将json数据转换成二进制在网络中传输。
查看>>
Python中的str与bytes之间的转换的三种方法
查看>>