“HAPPINESS SHOULD BE A FUNCTION WITHOUT ANY PARAMETERS”

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

 



        Programming in JAVA.       




Java Week 4: Q1

Complete the code segment to execute the following program successfully. You should import the correct package(s) and/or class(s) to complete the code.

PROGRAM:

import java.util.Scanner;
import static java.lang.System.out;

Java Week 4: Q2

Complete the code segment to print the current year. Your code should compile successfully.


PROGRAM:

java.util.Calendar cal =java.util.Calendar.getInstance();

year = cal.get(cal.YEAR);

  WEEK-4 :Programming in JAVA
PLEASE SUBSCRIBE OUR CHANNEL.

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.



No comments:

Post a comment

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