NPTEL(14 Sep - 04 Dec ) | Week 2 : Program 1and Program 2 Programming in JAVA Solutions 2020.

 



        Programming in JAVA.       







Java Week 2: Q1

Complete the code segment to call the method  print() of class Student first and then call print() method of class School

PROGRAM:

Student obj =new Student();

obj.print();

School obj1 =new School();

obj1.print();

Java Week 2: Q2

Complete the code segment to call the method  print() of class given class Printer to print the following.

--------------------------------
Hi! I am class STUDENT
Hi! I class SCHOOL.
--------------------------------

PROGRAM:

Printer obj1 =new Printer();
obj1.print("Hi! I am class STUDENT");
obj1.print();
else if(y>x && y>z)
  
{
  System.out.print(y);
}
else
{
  System.out.print(z);
}

FOLLOW OUR WEBSITE FROM THE BUTTON PROVIDED TO THE BOTTOM OF PAGE TO GET SOON ANSWERS OF PROGRAMS.
Disclaimer: Here you can find all nptel assignment solutions related to CS stream.These may help you for your assignment.The answers are only for verification.You cannot copy these directly from the post(code of conduct of NPTEL).These is not 100%  correct solutions.



1 comment:

If you have any problems related to solutions or any concept please let me know.

Copyright (c) 2020 Custom Programs All Right Reserved

Pages