1.thread is an independent path of execution within ur java
program.that means thread can share the same memory space.
2. the sequence of code executed for each task defines a
separate path of execution is called thread.
Thread is a light weight process.
Thread is a single sequential execution flow of control.
Each thread has its own Stack memory.
Different Threads share the same memory(Heap Memory) and it
use some algorithm for implementing time slice like(Round
Robin).were as different Process take different memory space.
1-Thread is a process of execution path of a programme.
2-Java supports single threading,but not supported
multithreading.
3-Threading causes sequential work in a programme.
84. try {
85. ResourceConnection con =
resourceFactory.getConnection();
86. Results r = con.query(”GET INFO FROM CUSTOMER”);
87. info = r.getData();
88. con.close();
89. } catch (ResourceException re) {
90. errorLog.write(re.getMessage());
91. }
92. return info;
Which is true if a ResourceException is thrown on line 86?
1 Line 92 will not execute.
2 The connection will not be retrieved in line
85.
3 The resource connection will not be closed
on line 88.
4 The enclosing method will throw an exception
to its caller.
A abstract class extending an abstract class.Super class
has both abstract and non-abstract methods.How can we
implement abstract and non-abstract mehtods? Explain with
snippet
Write program to print Hello World and print each character
address in that string and print how many times each
character is in that string?
Ex: H: 0 & 1
e:1 & 1
l :2,3,8 & 3
o:4,6 & 2
w:5 & 1
r: 7 & 1
d 9 & 1
Write java code to print "Hello how are you"
Thread1 should have "Hello"
Thread2 should have "how are you"
both the threads should start at the same time