双线程输出ab java_面试题:两个线程交替打印奇偶数

[INFO 2019-09-21 09:20:44.279] [main] org.springframework.test.context.support.AbstractTestContextBootstrapper.getTestExecutionListeners(AbstractTestContextBootstrapper.java:187) [Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@694abbdc, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@2e005c4b, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@4567f35d, org.springframework.test.context.support.DirtiesContextTestExecutionListener@5ffead27, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@6356695f, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@4f18837a, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@359f7cdf, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@1fa268de, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@4f6ee6e4, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@4466af20]][INFO 2019-09-21 09:20:44.380] [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:317) [Loading XML bean definitions from class path resource [applicationContext.xml]]

[INFO 2019-09-21 09:20:44.668] [main] org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:583) [Refreshing org.springframework.context.support.GenericApplicationContext@34a3d150: startup date [Sat Sep 21 09:20:44 CST 2019]; root of context hierarchy]

...

...

...

[INFO 2019-09-21 09:20:44.946] [Thread-2] com.rigel.concurrent.printab.PrintABVolatile.lambda$printAB$0(PrintABVolatile.java:27) [num:30]

[INFO 2019-09-21 09:20:44.947] [Thread-3] com.rigel.concurrent.printab.PrintABVolatile.lambda$printAB$1(PrintABVolatile.java:37) [num:31]

[INFO 2019-09-21 09:20:44.947] [Thread-2] com.rigel.concurrent.printab.PrintABVolatile.lambda$printAB$0(PrintABVolatile.java:27) [num:32]

[INFO 2019-09-21 09:20:44.947] [Thread-3] com.rigel.concurrent.printab.PrintABVolatile.lambda$printAB$1(PrintABVolatile.java:37) [num:33]

[INFO 2019-09-21 09:20:44.948] [Thread-2] com.rigel.concurrent.printab.PrintABVolatile.lambda$printAB$0(PrintABVolatile.java:27) [num:34]

Process finished with exit code 0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值