CoreJavaText_01

  1. You can run into grief if you drop a JAR file into the jre/lib/ext directory and one of its classes needs to load a class that ist not a system or extension class.The extension class loader does not user the class path.Keep that in mind before you use the extension directory as a way to manage your class file hassles
    扩展类加载器不会用放在jre/lib/ext中的你jar包中的类路径
  2. It might surprise you,however,that you can have two classes in the same virtual machine that have the same class and package name. A class is determined by its full name and the class loader.This technique is useful for loading code from multiple sources.For example,a browser uses separate instances of the applet class loader for each web page.This allows the virtual machine to separate classes from different web pages,no matter what they are named.Figure 9.2.Suppose a web page contains to applets,provided by different advertisers,and each applet has a class called Banner.Since each applet is loaded by a separate class loader,these classes are entirely distinct and do not conflict with each other.
    用不同的包名或者类加载器可以实现同名类不冲突
  3. It is very important that you don't modify the collection that is backing a stream while carrying out a stream operation(even if the modification is threadsafe).Remember that streams don't collect their data--that data is always in a separate collection.If you were to modify that collection,the outcome of the stream operations would be undefined.The JDK documentation refers to this requirement as noninterference.It applies both to sequential and parallel streams.
    
    To be exact,since intermediate stream operations are lazy,it is possible to mutate the collection up to the point when the terminal operation executes.For example,the following,while certainly not recommended,will work:
    List<String wordList = …;
    Stream words = wordList.stream();
    wordList.add(“End”);
    long n = words.distinct().count();
    this code is wrong:
    Stream words = wordList.stream();
    words.forEach(s->if(s.length()<12) wordList.remove(s));
    不要在遍历的时候操作流,因为数据保存在集合中而不是流中,如果操作了那么集合发生改变会出现异常
    4、Why Java didn’t adopt the ODBC model,the reason ,as given the JavaOne conference in 1996
    4.1、ODBC is hard to learn
    4.2、ODBC has a few commands with lots of complex options.The preferred style in the Java programming language is to have simple and intuitive methods,but to have lots of them
    4.3、ODBC relies on the use of void* pointers and other C features that are not natural in the Java programming language
    4.4、An ODBC-based solution is inhherently less safe and harder to deploy than a pure Java solution
    为什么Java不用ODBC,他们在1996说ODBC较难学习,ODBC有些方法需要很复杂的选项。他们的设计思路和Java的简洁和直观思想所违背。ODBC依赖于void*和指针和C的一些特性,而他们在Java语言中不自然。最后就是ODBC的解决方案天生是不安全的而且难以依赖纯净的Java
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值