Process: Task
Task concurrency execution is a macro concept, which is a micro-serial.
Process scheduling is OS-owned (some systems are exclusive, some systems are shared, and processes are prioritized according to importance).
The time is divided by the OS into a number of time slices.
Java supports multithreading at the language level.
The time allotted is still the OS.
1 Package tomtexts;2 3 Public classtomtexts_21 {4 Public Static voidMain (String args[])5 {6 intdata1[]={2,4,6,8,Ten, A};7 intdata2[]={1,0,2,4,3};8 Try9 {Ten for(intI=0; i<data1.length;i++) { One Try{ ASystem. out. println (data1[i]+"/"+data2[i]+" is"+data1[i]/data2[i]); - } - Catch(arithmeticexception e) the { -System. out. println ("cannot be removed by 0! "); - } - } + } - Catch(arrayindexoutofboundsexception e) + { ASystem. out. println ("The program is terminated! "); at } - } - -}
Java supports multithreading at the language level