these are java program... this is fill in the gaps...it’s urgent.
(2) 1. Write the output of these code block without running (1) class Person { public Person () { System.out.println("hi!"); } public Person (Strings) { this ((); System.out.println("I am "+s); } } public class Who extends Person { public Who () { this ("I am Tony"); } public Who (String s) { super (s); System.out.println("How do you do?"); } public static void main(String args[]) { Who w new Who (); public class TestDemo { int m=5; public void some (int x) { m=x; public static void main(String args[]) { new Demo (). some (7) ; }
(3) } class Demo extends Test Demo { int m=8; public void some (int x) { super. some (x); System.out.println (m); abstract class Base { abstract public void myfunc(); public void another () { System.out.println ("Another method"); } public class Abs extends Base { public static void main(String args[]) { Abs a = new Abs ((); a. amethod (); } public void myfunc() { System.out.println("My Func"); } public void amethod () { myfunc(); } }
(4) class TestChoose { public static void main(String args[]) { int n=2; while (n<=10) { boolean flag-true; int kl=2; while (kl<=n/2+1) { if (n%k1==0) { flag-false; break; System.out.println(n+" "); kl++; } if (flag) { } n++;
these are java program... this is fill in the gaps...it’s urgent.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am