Q1. Write the output for the following code segments. Attach a screenshot for your output. # Output [01 Mark] } Code imp

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Q1. Write the output for the following code segments. Attach a screenshot for your output. # Output [01 Mark] } Code imp

Post by answerhappygod »

Q1 Write The Output For The Following Code Segments Attach A Screenshot For Your Output Output 01 Mark Code Imp 1
Q1 Write The Output For The Following Code Segments Attach A Screenshot For Your Output Output 01 Mark Code Imp 1 (35.6 KiB) Viewed 53 times
Q1 Write The Output For The Following Code Segments Attach A Screenshot For Your Output Output 01 Mark Code Imp 2
Q1 Write The Output For The Following Code Segments Attach A Screenshot For Your Output Output 01 Mark Code Imp 2 (27.71 KiB) Viewed 53 times
Q1. Write the output for the following code segments. Attach a screenshot for your output. # Output [01 Mark] } Code import java.util."; class Arraylist { public static void main(String args[]) { ArrayList obj = new ArrayList(); obj.add("A"); obj.add("B"); obj.add("C"); obj.add(2, "D"); System.out.println(obj); } class array_output { public static void main(String args[]) { int array_variable [] = new int[10]; for (int i = 0; i < 10; ++i) { array_variable = 1; System.out.print(array_variable i++; } [01 Mark] > } [01 Mark] class A { public int i; public int ); AC) { i = 1; j = 2;

class B extends A { int a; B) { super(); } } class super_use { public static void main(String args[]) { B obj - new B(); System.out.println(obj.i + "." + obj.1); } } [01 Mark] | super. i) class A { public int i; private int j; } class B extends A { void display) { super.j = super.i + 1; System.out.println(super.i + ; } class inheritance { public static void main(String args[]) { B obj = new BO); obj.i=1; obj.1-2; obj.display(); ) }
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply