Development Environment of Java

Development Environment of Java

JVM - Java Virtual Machine

All of the code run in JVM(Like a translator)

Cross-platform

  • JVMs of different OS are different, JVM is not cross-platform
  • All of the programs runs in JVM and all the JVMs run on the OS

JRE(Java Runtime Environment)

  • the environment Jave code runs on, which includes JVM and Esential Class Lib for running

JDK(Java Development Kit)

  • including JRE & tools developers need

If you want to run a existing Java program, only JRE is needed

If you want to develop a new Java program, you must install JDK

image-20200327203832387

Optimization of Compliers

for byte/short/char these 3 kinds of types,:

  • if the values on the right side doesn’t exceed the range of the left side, the complier - Javac - will automatically add (byte)(short)(short)
  • if it dosen’t exceed, the complier will report “error”
  • When assigning a value to a variable, Javac will directly use the result of the expression as its value if the right side is all parameters
short a=5;
short b=8;
short result=5+8; //right
short result=a+b; //wrong

if there are variables on the right side, the optimization won’t work.

short result=5+a+8; //wrong

Structure of IDEA

PS:

  • the name of packages should be lower case

Common Shortcut of IDEA

ShortcutFunction
Ctrl+xEliminate the line
Opt+EnterImporting jar package
Ctrl+dDuplicate the line
Opt+cmd+LImporting jar package
Cmd+/Annotation selected area
Cmd+Shift+/Annotation selected area
Cmd+Shift+Arrow keysMove the line
"num.fori"loop(i)
"array.fori"loop(array)

Import Models

File

Project Structure

Modules

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值