Sogou Java- directory from scratch

The first chapter 1.1 programming language abstract process and the basic characteristics of Java 1.2 object - service provider 1.3 hide the specific implementation 1.4 multiplexing code 1.4 multiplexing code 1.5 inheritance (1) 1.5 inheritance (2)...
read(3399) comment(11)

Sogou Zero based learning python- directory

The first chapter first Python 1.1 install Python 1.2 what is idle 1.3 start Python via idle 1.4 world hello...
read(3130) comment(13)

Spring- directory from scratch

Actual article: the first chapter of the introduction of Spring and Bean1.1 what is dependent on the injection? Why does it need to rely on injection? 1.2 what is AOP? Why the need for aspect oriented programming? Scope of Bean1.5 Bean and Bean1.4 1.3 Spring into the container through the constructor...
read(236) comment(2)

De novo understanding of the role of Bean Spring-1.5

In this chapter we will discuss the scope of the Bean. 1.Bean scope singleton: cases of single prototype: any time create people each request to create a, only in the Web: each session to create a, only in Web effective global-session: in the global session, each bean an instance of the above several roles of the domain we generally use singleton and prototype and to singleton mainly...
read(230) comment(0)

From the understanding of Bean into the Spring-1.4 through the constructor

In this section we introduce the Bean constructor injection. 1 how to life a Bean? (1) create a class com.raylee.my_new_spring.my_new_spring.ch01.topic_1_2 package; Class Song public { String name private; Song public (name String) { This.name = name; }...
read(626) comment(0)

Spring Spring-1.3 container and Bean from scratch

In this chapter we will discuss the Spring container and Bean. 1.Spring container the beanfactory this is achieved by org.springframework.beans.factory.BeanFactory (2) ApplicationContext this is we realized by org.springframework.context.ApplicationContext in programming in general, is its applica...
read(370) comment(0)

Ab initio knowledge of Spring-1.2 what is AOP? Why the need for aspect oriented programming?

This chapter we introduce what is AOP? Why the need for aspect oriented programming? 1 what is AOP? (Baidu Encyclopedia version) AOP to achieve the main purpose is for the business section in the process of extraction, it is faced with is process of a phase or step processing, in order to obtain the logical process between the various parts of the low coupling isolation effect. For example, our most common is the log record, for example, we now provide a query student information services, but we want to record who conducted this query. If in accordance with the traditional OOP implementation, then we achieve a query...
read(290) comment(3)

Ab initio knowledge of Spring-1.1 what is dependency injection? Why does it need to rely on injection?

In this chapter we will discuss what is dependency injection? Why does it need to rely on injection? 1 what is dependency injection? I understand that: the generation of objects is no longer through the display of the new, but also to the spring container inside take, the object is to use the creation of this form 2 why need to rely on injection? (1) decoupling (2) is easy to test we sing this as an example, in the absence of the use of dependency injection Code: com.raylee.my_new_spring.my_new_spring.ch01.to package...
read(261) comment(0)

Synchronized java-18.6 from scratch to synchronize and ThreadLocal on other objects to eliminate the problem of synchronization of shared objects

In this chapter we introduce synchronization with ThreadLocal on other objects. In the previous chapter, we used 1.synchronized to synchronize ThreadA implements Runnable class on other objects. 私有对象=新object(); 私人test()抛出InterruptedException {同步无效…
阅读(344) 评论(1)

从头认识java-18.5临界区

这一章节我们来讨论一下临界区。一般来说,我们使用多线程都是直接在方法上面加上同步,但是其实这样有些时候对于性能来说,有所欠缺,因此今天来讨论一下临界区的问题。1。一般做法的例子类实现Runnable {开启 私人test()抛出InterruptedException {同步无效 …
阅读(383) 评论(2)

从头认识java-18.4 Java多线程原子性操作里面的坑

这一章节我们来讨论一下Java多线程原子性里面的坑。1。看似原子性操作:包com.ray.ch18; 公开课测验 私有变量= 0; 私人b = 0; methoda() { public void 乙= 1; } 公共methodb() { int 返回; …
阅读(487) 评论(0)

从头认识java-18.3什么时候使用同步?

这一章节我们再次来讨论竞争条件的第一个方面:不正确的访问资源。我们上次以银行转账的例子说明了一下竞争条件,我们下面再引入另一个例子,再次说明竞争条件的形成。1。例子:包com.ray.ch18; 进口java.util.concurrent.executorservice; 进口java.util.concurrent.executors; 公共环境。
阅读(422) 评论(1)

从头认识java-18.2基本的线程机制(8)多线程的异常捕捉

这一章节我们来讨论一下多线程的异常捕捉。1。普通情况的异常包com.ray.ch17; 公开课测验 public static void main(String [] args){ 尝试{ 新的threada()。run(); (例外情况){ 系统,捕捉到异println(”…
阅读(519) 评论(0)

从头认识java-18.2基本的线程机制(7)加入

这一章节我们来讨论一下加入。1。什么是加入?堵塞当前线程,让。加入的线程先做完,然后再继续当前线程下面是API的解释:a.join,在API中的解释是,堵塞当前线程B,直到一执行完毕并死掉,再执行B. 2。例子:包com.ray.ch17; 公开课测验 public static void main(String [] args)通过…
阅读(431) 评论(0)

从头认识java-18.2基本的线程机制(6)-使用构造器或者内部类来实现多线程的编码变体

这一章节我们来讨论一下使用构造器或者内部类来实现多线程的编码变体。1。基础实现包com.ray.ch17; 公开课测验 public static void main(String [] args){ 线程线程1 =新extendsthread(); 线程1。start(); 线程2…
阅读(280) 评论(0)

从头认识java-18.2基本的线程机制(5)-守护线程与非守护线程

这一章节我们来讨论一下守护线程与非守护线程。1。什么是守护线程?什么是非守护线程?非守护线程:Java虚拟机在它所有非守护线程已经离开后自动离开。守护线程:守护线程则是用来服务用户线程的,如果没有其他用户线程在运行,那么就没有可服务对象,也就没有理由继续下去。2。相同点大家都是线程,其实可以互相切换3。不同点:退出的时间点退出的先后顺序:非守护线程->守护线程-> jvm4。注意点:(1)设置守护线…
阅读(427) 评论(0)

从头认识java-18.2基本的线程机制(4)-优先级

这一章节我们来讨论一下多线程的优先级问题。1。例子:包com.ray.ch17; 公开课测验 public static void main(String [] args){ mythead mythead =新mythead(); mythead2 mythead2 =新mythead2(); 为(int i =…
阅读(565) 评论(0)

从头认识java-18.2基本的线程机制(3)-线程的返回与睡眠

这一章节我们来讨论一下线程的返回与sleep.1.线程的返回package com.ray.ch17; java.util.random进出; java.util.concurrent.callable进出; java.util.concurrent.executionexception进出; 进出口java.util.concurrent.exe……
阅读(812) 评论(0)

从头认识java - 17.7执行器(执行程)

这一章节我们来讨论一下executor的第一个话题线程池.1.什么是线程池?(下面的解释来自http:/ / baike.haosou.com /医生/ 2511076-2653416.html)线程池是一种多线程处理形式,处理过程中将任务添加到队列,然后在创建线程后自动启动这些任务.线程池线程都是后台线程.每个线程都使用默认的堆栈大小,以默认的优先级运行,并处于多线程单元中.如果某个线程在托管代码中空……
阅读(442) 评论(0)

从头认识java - 17.6 callable、future和futuretask

这一章节我们来讨论一下callable、future和futuretask的用法与关系.1.关系(1),(2)callable是runnable的封装的异步运算任务future用来保存callable异步运算的结果(3)futuretask封装future的实体类 2.future我们在这里详细介绍一下future,因为它比较复杂,首先看看他的源代码:未来的公共接口。
阅读(590) 评论(1)

从头认识java - 17.5阻塞队列(以生产者消费者模式为例)

com.ray.ch17包; java.util.concurrent.linkedblockingqueue进出; {公共类的测试 公共静态无效的手(String [ ] args){ 篮球=新篮球(); thread1 =新线程的线程(不……
阅读(550) 评论(3)

从头认识java~17.4详解同步(5)死锁

这一章节我们来简单讨论一下死锁,其实死锁是一个比较大的话题,但是我这里只是根据我前面的银行转账的例子来说明,在后面会有详细的专栏来说明并发编程的各个方面的问题.1.什么是死锁?是指两个或两个以上的进程在执行过程中,由于竞争资源或者由于彼此通信而造成的一种阻塞的现象,若无外力作用,它们都将无法推进下去.2.怎样会引起死锁?(1):一个资源每次只能被一个进程使用互斥条件;(2):既拿请求与保持条件……
阅读(467) 评论(1)
382条数据共20页1 2 3 4 5 …… 下一页 尾页
    个人资料
    • 访问:252049次
    • 积分:6462
    • 等级:
    • 排名:第2020名
    • 原创:378篇
    • 转载:1篇
    • 原文:2篇
    • 评论:179条
    博客专栏
    文章分类
    文章存档