Explain the difference between thread and a process,use of static variable,etc
Utilisateur anonyme
Threads are used for small tasks, whereas processes are used for more 'heavyweight' tasks – basically the execution of applications. Another difference between a thread and a process is that threads within the same process share the same address space, whereas different processes do not. static variables are used when only one copy of the variable is required. so if you declare variable inside the method there is no use of such variable it's become local to function only.. Variables declared static are commonly shared across all instances of a class.