DECLAREi number(3);j number(3);BEGINi := 2;LOOPj:= 2;LOOPexit WHEN ((mod(i, j) = 0) or (j = i));j := j +1;END LOOP;IF (j = i ) THENdbms_output.put_line(i || ' is prime ');END IF;i := i + 1;exit WHEN i = 40;END LOOP;END;/
DECLARE i number(3); j number(3); BEGIN i := 2; LOOP j:= 2; LOOP exit WHEN ((mod(i, j) = 0) or (j = i)); j := j +1; END LOOP; IF (j = i ) THEN dbms_output.put_line(i || ' is prime '); END IF; i := i + 1; exit WHEN i = 40; END LOOP; END; /
public class Main { public static void main(String[] args) { Runnable r = new Runnable1(); Thread t = new Thread(r); t.start(); Runnable r2 = new Runnable2(); Thread t2 = new Thread(r2); t2.start(); } } class Runnable2 implements Runnable{ public void run(){ for(int i=1;i<=20;i++){ if(i%2 == 1) SRead more
public class Main {
public static void main(String[] args) {
Runnable r = new Runnable1();
Thread t = new Thread(r);
t.start();
Runnable r2 = new Runnable2();
Thread t2 = new Thread(r2);
t2.start();
}
}
class Runnable2 implements Runnable{
public void run(){
for(int i=1;i<=20;i++){
if(i%2 == 1)
System.out.println(i);
}
}
}
class Runnable1 implements Runnable{
public void run(){
for(int i=1;i<=20;i++){
if(i%2 == 0)
System.out.println(i);
}
}
}
Write a program in PL/SQL to show the uses of nested loop.
DECLAREi number(3);j number(3);BEGINi := 2;LOOPj:= 2;LOOPexit WHEN ((mod(i, j) = 0) or (j = i));j := j +1;END LOOP;IF (j = i ) THENdbms_output.put_line(i || ' is prime ');END IF;i := i + 1;exit WHEN i = 40;END LOOP;END;/
1. Create a class of SalesPersons as a thread that will display five salespersons names. 2. Create a class as Days as other Thread that has an array of seven days. 3. Call the instance of SalesPersons in Days and start both the threads 4. suspend SalesPersons on Sunday and resume on Wednesday Note: use suspend, resume methods from the thread
C++ Code with Output
C++ Code with Output
See lessCreate two threads, one thread to display all even numbers between 1 & 20-java
public class Main { public static void main(String[] args) { Runnable r = new Runnable1(); Thread t = new Thread(r); t.start(); Runnable r2 = new Runnable2(); Thread t2 = new Thread(r2); t2.start(); } } class Runnable2 implements Runnable{ public void run(){ for(int i=1;i<=20;i++){ if(i%2 == 1) SRead more
public class Main {
public static void main(String[] args) {
Runnable r = new Runnable1();
Thread t = new Thread(r);
t.start();
Runnable r2 = new Runnable2();
Thread t2 = new Thread(r2);
t2.start();
}
}
class Runnable2 implements Runnable{
public void run(){
for(int i=1;i<=20;i++){
if(i%2 == 1)
System.out.println(i);
}
}
}
class Runnable1 implements Runnable{
See lesspublic void run(){
for(int i=1;i<=20;i++){
if(i%2 == 0)
System.out.println(i);
}
}
}
Create a student class object array of size four having attributes name-Java programming language
DOWNLOAD ATTACHMENT:
DOWNLOAD ATTACHMENT:
See lessByteArrayInputStream and ByteArrayOutputStream;CharArrayReader and CharArrayWriter;serialization and Deserialization;InputStream, Reader;‘Scooby’ and ‘Shaggy’
DOWNLOAD ATTACHMENT FOR ANSWER:
DOWNLOAD ATTACHMENT FOR ANSWER:
See lessCIRCULAR LINKED LIST
PLEASE UPLOAD PIC OF YOUR QUESTION TOO. I M NOT GETTING YOUR QUESTION PROPERLY.
PLEASE UPLOAD PIC OF YOUR QUESTION TOO.
I M NOT GETTING YOUR QUESTION PROPERLY.
See less