描述
两个线程,一个打印100内的奇数一个打印100内的偶数,交替执行。
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
结果
奇数1
oushu—–2
奇数3
oushu—–4
奇数5
oushu—–6
奇数7
oushu—–8
奇数9
oushu—–10
奇数11
oushu—–12
奇数13
oushu—–14
奇数15
oushu—–16
奇数17
oushu—–18
奇数19
oushu—–20
奇数21
oushu—–22
奇数23
oushu—–24
奇数25
oushu—–26
奇数27
oushu—–28
奇数29
oushu—–30
奇数31
oushu—–32
奇数33
oushu—–34
奇数35
oushu—–36
奇数37
oushu—–38
奇数39
oushu—–40
奇数41
oushu—–42
奇数43
oushu—–44
奇数45
oushu—–46
奇数47
oushu—–48
奇数49
oushu—–50
奇数51
oushu—–52
奇数53
oushu—–54
奇数55
oushu—–56
奇数57
oushu—–58
奇数59
oushu—–60
奇数61
oushu—–62
奇数63
oushu—–64
奇数65
oushu—–66
奇数67
oushu—–68
奇数69
oushu—–70
奇数71
oushu—–72
奇数73
oushu—–74
奇数75
oushu—–76
奇数77
oushu—–78
奇数79
oushu—–80
奇数81
oushu—–82
奇数83
oushu—–84
奇数85
oushu—–86
奇数87
oushu—–88
奇数89
oushu—–90
奇数91
oushu—–92
奇数93
oushu—–94
奇数95
oushu—–96
奇数97
oushu—–98
奇数99
oushu—–100