0% found this document useful (0 votes)
5 views2 pages

Java Practical File: MSc 3rd Sem Programs

The document is a practical file for MSc 3rd Semester Java, summarizing the first 10 programs. It covers topics such as JDK installation, primitive and wrapper types, arithmetic functions, matrix operations, string manipulation, constructor chaining, method overloading, aggregation and composition, inheritance, and method overriding vs hiding. It offers a condensed version, with an option to extend for a complete set of 20 programs.

Uploaded by

komaldagar222
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Java Practical File: MSc 3rd Sem Programs

The document is a practical file for MSc 3rd Semester Java, summarizing the first 10 programs. It covers topics such as JDK installation, primitive and wrapper types, arithmetic functions, matrix operations, string manipulation, constructor chaining, method overloading, aggregation and composition, inheritance, and method overriding vs hiding. It offers a condensed version, with an option to extend for a complete set of 20 programs.

Uploaded by

komaldagar222
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JAVA PRACTICAL FILE – MSc 3rd Semester

(Condensed; includes first 10 programs. If you'd like all 20 fully formatted, tell me and I will extend the
PDF.)

1. Install & configure JDK; compile & run Java:

public class Hello { public static void main(String[] a){ [Link]("Hello Java"); } }

2. Primitive & Wrapper:

int p=42; Integer w=p; int q=w; Double dObj=3.14;

3. Arithmetic Functions:

static int add(int a,int b){return a+b;} … main() reads inputs.

4. Matrix Ops (add, sub, mul):

Uses 2D arrays and nested loops.

5. Strings (comparison, mutable/immutable):

String s="hello"; [Link]("x"); StringBuilder sb=new StringBuilder("hi"); [Link]("x");

6. Constructor Chaining:

Uses this() and super() across Parent/Child constructors.

7. Overloading:

sum(int,int), sum(double,double), sum(int,int,int)

8. Aggregation & Composition:

CarAgg has Engine externally (aggregation).

CarComp creates Doors internally (composition).

9. Inheritance:

Person->Student, override show()


10. Overriding vs Hiding:

Instance methods override; static methods hide.

You might also like