[Java in NetBeans] Lesson 03. More Variables / Type Casting
这个课程的参考视频在youtube。
主要学到的知识点有:
- It is different from python, that "1" only present string "1", and '1' only presents char '1'.
- (type) can chang the type , e.g. (int) (totalScore/4.5); will change the result of(totoalScore/4.5) which is a float into integer.
- But if want to change String to int or double, it does not work for previous method. Need Integer.parseInt("3") change "3" as 3, need Double.parseDouble("3.0") change "3.0" into 3.0.
- x = 2, y = 3; if we want to get double 2/3, then we can do result = x/ (float) y;
[Java in NetBeans] Lesson 03. More Variables / Type Casting的更多相关文章
- [Java in NetBeans] Lesson 02. Variables, Data Types and Assignment.
这个课程的参考视频在youtube. 主要学到的知识点有: Data Type: int, char, String, double, boolean. When into printf, int ( ...
- [Java in NetBeans] Lesson 05. Method/function
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: Define a method:(motivation: write one time, but use it many times ...
- [Java in NetBeans] Lesson 16. Exceptions.
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: We want to handle the bad Error. (e.g bad input / bugs in program) ...
- [Java in NetBeans] Lesson 09. Switch / If-Else Ladder
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: 1. Nested If-else statement (if-else ladder) /** * 90 and above == ...
- [Java in NetBeans] Lesson 07. JavaDoc and Unit Tests
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: 1. organize code into packages Create a package if want to make th ...
- [Java in NetBeans] Lesson 06. Custom classes
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: Constructors: A special method called when an object of the class ...
- [Java in NetBeans] Lesson 04. Class / Objects
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: Class: Blueprint for an object. (e.g. dog is a class) Object: cust ...
- [Java in NetBeans] Lesson 00. Getting Set-up for Learning Java
这个课程的参考视频在youtube. 主要学到的知识点有: set up needs Java SE JDK, NetBeans IDE class name should be the same l ...
- [Java in NetBeans] Lesson 17. File Input/Output.
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: We want to handle the bad Error. (e.g bad input / bugs in program) ...
随机推荐
- ZOJ Problem Set - 2014 Piggy-Bank【完全背包】
Description Before ACM can do anything, a budget must be prepared and the necessary financial suppor ...
- 从 Firefox 35 版本开始,就无法兼容 PAC 式代理
经过反复的测试,包括在“高级”选项里启用 PAC 代理的设置,也都无法使用 PAC 的代理——无法登陆 Twitter 账号,无法打开 Google 网页. 不知道各位有什么好办法吗? 以及中文火狐社 ...
- CMSampleBufferRef转换
参考链接:https://blog.csdn.net/shenyi0106/article/details/47004039 https://blog.csdn.net/jeffasd/article ...
- haproxy实现会话保持
HAProxy系列文章:http://www.cnblogs.com/f-ck-need-u/p/7576137.html 1.反向代理为什么需要设置cookie 任何一个七层的http负载均衡器,都 ...
- 类中的函数带有self,不带self的区别
1.类里函数不带self,这是我们调用类里的函数直接用类名.函数名() class shop(object): def scan_goods(): #括号内不带self print('浏览商品') d ...
- io.UnsupportedOperation: not readable
两处错误一.你是用open打开一个文件,此时调用的是w写入模式,下面使用read是没有权限的,你得使用w+读写模式二.使用write写入一个字符s,但是此时并没有真正的写入,而是还存在与内存中.此时执 ...
- python知识点杂记2
1. 如果已经有一个list或者tuple,要调用一个可变参数怎么办?2. >>> nums = [1, 2, 3]3. >>> calc(*nums)4. 14* ...
- 洛谷 P3521 ROT-Tree Rotations [POI2011] 线段树
正解:线段树合并 解题报告: 传送门! 今天学了下线段树合并,,,感觉线段树相关的应用什么的还是挺有趣的,今天晚上可能会整理一下QAQ? 然后直接看这道题 现在考虑对一个节点nw,现在已经分别处理出它 ...
- 洛谷P4198 楼房重建 单调栈+线段树
正解:单调栈+线段树 解题报告: 传送门! 首先考虑不修改的话就是个单调栈板子题昂,这个就是 然后这题的话,,,我怎么记得之前考试好像有次考到了类似的题目昂,,,?反正我总觉着这方法似曾相识的样子,, ...
- java实现消息队列的两种方式
https://blog.csdn.net/fenfenguai/article/details/79257928