NPTEL Programming In Java Assignment 2021

Java ASSIGNMENT

NPTEL Programming In Java Assignment One of the main factors contributing to the rise of technology as it is today has been the rapid growth of Information and Communication Technology. With most companies’ recent ventures centered on software development, you will need a team who can handle all business aspects (customer service, communication, marketing) whilst getting their hands dirty by working directly on actual code.

NPTEL Programming in Java is a MOOC course offered by IIT Kharagpur on the NPTEL platform. This course aims to cover the essential topics of Java programming so that the participants can improve their skills to cope with the current demand of IT industries and solve many problems in their own filed of studies. The course is developed by Debasis Samanta holds a Ph.D. in Computer Science and Engineering from the Indian Institute of Technology Kharagpur.

  1. INTENDED AUDIENCE: All Undergraduates
  2. Requirements/Prerequisites: NIL
  3. INDUSTRY SUPPORT: All compaines or industry

CRITERIA TO GET A CERTIFICATE

Students have to score Average assignment score = 25% of the average of the best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100 Final scores = Average assignment score + Exam score.

Students will be eligible for CERTIFICATE ONLY IF AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If any of the 2 criteria are not met, the student will not get the certificate even if the Final score >= 40/100.

NPTEL Programming In Java ASSIGNMENT WEEK 11 ANSWERS:-

Contents

Q1. Which of the following is not a JDBC drivers?

Answer:- d

If you want help with the 16 Oct Online Programming test and help in the final exam take our membership for a better score in the exam read more here:- Final Exam Membership

Q2. Which of the following is a JDBC class component?

Answer:- b

Q3. As with Statement objects, to execute a PreparedStatement object, it need to be call an execute statement. Which of the following statement(s) is/are true regarding this?

Answer:- a,b,c

Q4. Which of the following statement(s) is/are true, when the return value for execute Update is

Answer:- a,b

FOR PROGRAMMING ASSIGNMENT VISIT :- Programming In Java Assignment

Q5. Which of the following statement is used for executing a database stored procedure?

Answer:- c

Q6. Once a JDBC driver has been registered, which of the following method is used to make a database connection?

Answer:- a

Q7. The SQL command “USE test” implies, which of the following?

Answer:- d

Q8. What happens after execution of the following code?

Answer:- d

If you want help with the 16 Oct Online Programming test and help in the final exam take our membership for a better score in the exam read more here:- Final Exam Membership

Q9. How do you know in your Java program that a SQL warning is generated as a result of executing a SQL statement in the database?

Answer:- c

Q10. Which one of the following SQL type represent getfloat()?

Answer:- b

NPTEL Programming In Java ASSIGNMENT WEEK 10 ANSWERS:-

Q1. Which of the following statement(s) is(are) NOT true?

Answer:- a,c

Q2. Which of the following statement(s) is/are true?

Answer:- a,c

If you want help with the 16 Oct Online Programming test and help in the final exam take our membership for a better score in the exam read more here:- Final Exam Membership

Q3. Which of the following is/are interface (s) present in java.net package?

Answer:- c

Q4. Which of the following statement(s) is/are true?

Answer:- a,b,c,d

FOR PROGRAMMING ASSIGNMENT VISIT :- Programming In Java Assignment

Q5. In the following URL, identify the Resource name?

Answer:- b

Q6. Which of the following is/are application layer protocol(s)?

Answer:- c,d

Q7. In the socket programming, for an IP address, which can be used to find the host name and IP address of a client/server?

Answer:- c

Q8. Which of the following is/are valid Data Manipulation Language (DML) command(s)?

Answer:- a,b,c

Q9. In JDBC, all raw data types (including binary documents or images) should be read and uploaded to the database as an array of

Answer:- c

Q10. The package, which is required to be imported for the JDBC programming?

Answer:- b

If you want help with the 16 Oct Online Programming test and help in the final exam take our membership for a better score in the exam read more here:- Final Exam Membership

NPTEL Programming In Java ASSIGNMENT WEEK 9 ANSWERS:-

Q1. Which of the following is/are interface(s) in javax.swing package?

Answer:- a,b,d

Q2. Which of the following Listener(s) is/are not supported by frame (Swing component)?

Answer:- a,b,c

If you want help with the 16 Oct Online Programming test and help in the final exam take our membership for a better score in the exam read more here:- Final Exam Membership

Q3. What is/are not a listener in context to event handling?

Answer:- b

Q4. Give the abbreviation of AWT?

Answer:- d

Q5. How many types of controls does AWT support?

Answer:- c

Q6. Which package is not imported for swing components

Answer:- a,b,d

Q7. Analyze the following code.

Answer:- b

Q8. In JLabel(Icon, int) method/constructor, the int argument specifies the horizontal

alignment of the label’s contents within its drawing area.

Which of the following is/are valid constants for horizontal alignment?

Answer:- a,b,c,d

Q9. Which of the following are valid “Method or Constructor” in Setting or Obtaining the Field’s

Answer:- a,b,c,d

FOR PROGRAMMING ASSIGNMENT VISIT:- Programming In Java Assignment

Q10. When are the keyboard events fired?

Answer:- d

NPTEL Programming In Java ASSIGNMENT WEEK 8 ANSWERS:-

Q1. Which of the following is NOT a class of java.awt package?

Answer:- d

Q2. Which of the following is/are NOT an exception of java.awt package?

Answer:- c

IMPORTANT:- 16 OCTOBER ONLINE PROGRAMMING TEST/ UNRPOCTORED TEST ANSWERS WILL BE PROVIDED BY US JOIN US ON TELEGRAM

quizxp telegram

Q3. Which of the following method is/are a class button of java.awt package?

Answer:- b

Q4. Which of the following container does not contain titlebar and menubar?

Answer:- b

Q5. Which package provides many event classes and Listener interfaces for event handling?

Answer:- b

Q6. What is the name of the method used to get the current font of an graphic in java.awt.graphics?

Answer:- c

Q7. Which of the following method remove all items from scrolling list in java.awt.list?

Answer:- b

Q8. Which of the following statement is true about the update() in java.awt package?

Answer:- b

Q9. Which of the following methods can be used to return the current size size of a java.awt.Component object?

Answer:- d

FOR PROGRAMMING ASSIGNMENT VISIT :- Programming In Java Assignment

Q10. When we invoke update () for a java.awt. Component object, the AWT invokes which of the following method?

Answer:- d

NPTEL Programming In Java ASSIGNMENT WEEK 7 ANSWERS:-

Q1. What will be the output of the following code?

Answer:- a

Q2. Which of the following is/are NOT member(s) of java.io package?

Answer:- a

Q3. Which of these class is not a member class of java.io package?

Answer:- d

Q4. Which method is used to write an array of byte to the current output stream?

Answer:- b

IMPORTANT:- 16 OCTOBER ONLINE PROGRAMMING TEST/ UNRPOCTORED TEST ANSWERS WILL BE PROVIDED BY US JOIN US ON TELEGRAM

quizxp telegram

Q5. In java, how many standard streams are available?

Answer:- b

Q6. Which of the following method in java.io package help in clearing the contents of the buffer?

Answer:- b

Q7. Which method of Random AccessFile class reads a line from the file and returns it as a String?

Answer:- b

Q8. Which of the following is/are valid method(s) in class File?

Answer:- a,d

Q9. Which of the following is/are Not interface(s) of java.io package?

Answer:- a

FOR PROGRAMMING ASSIGNMENT VISIT :- Programming In Java Assignment

Q10. output of the code?

Answer:- a

NPTEL Programming In Java ASSIGNMENT WEEK 5 ANSWERS:-

Q1. Which of the following is not true about throw

Answer:-

Q2. Which of the following is not true about custom exception in java?

Answer:-

Q3. Which of the following is not a property of tagged Interface?

Answer:-

Q4. Which of the following is not an exception in Java?

Answer:-

Q5. Which of the following is type of Java Exception?

Answer:-

Q6. Which of the following keywords is not a part of exception handling?

Answer:-

Q7. Which of the option is correct regarding multiple catch blocks?

Answer:-

Q8. When an array element is accessed beyond the array size, then which exception occurs

Answer:-

Q9. What is the output of this program?

Answer:-

Q10. When does an exception occur?

Answer:-

NPTEL Programming In Java ASSIGNMENT WEEK 4 ANSWERS:-

Q1. Which of these is a mechanism for naming and visibility control of a class and its content?

Answer:- c

quizxp telegram

Q2. Which of the following is false statement about packages in java?

Answer:- d

Q3. Which of the following is/are interface(s) of java.awt package?

Answer:- c

Q4. Which of the following statement(s) is/are false?

Answer:- c

Q5. Consider the below program

import static java.lang. Math. *;

public class Main(

public static void main(String args[]) {

System.out.println (cos (2*PI));
}

Answer:- c

Q6. Which of the following packages is used to include utility classes like Calendar, Collections,

and Date?

Answer:- b

Q7. Which of the following statement(s) is/are false?

Answer:- c

Q8. Which of the following is/are valid declaration(s) of an interface?

Answer:- c,d

Q9. Which of the following is false statement about interface in java?

Answer:- d

Q10. Which of these access specifier(s) can be used for an interface?

Answer:- a

NPTEL Programming In Java ASSIGNMENT WEEK 3 ANSWERS:-

Q1. Consider the following piece of code in java.

class A {
public int i; protected int j;
}
class B extends A
{
void display()
{
super.j = super.i+1; System.out.println(super.i+""+ super.j);
}
}
public class inheritance
{
public static void main(String args[])
{
B obj = new B();
obj.i=2;
obj.j=2;
obj.display();
}
}

Answer:- A

Q2. Consider the following piece of code in Java.

public class Question
{
public static int x = 7;
public static void main(String[] args) {
Question a = new Question (); Question b = new Question ();
a.x = 2;
b.x = 3;
System.out.println (a.x+b.x+++Question.x);
}
}

Answer:- B

Note:- WE NEVER PROMOTE COPYING AND We do not claim 100% surety of answers, these answers are based on our sole knowledge and by posting these answers we are just trying to help students to reference, so we urge do you assignment own your own.

Q3. Which of these keywords are used to define an abstract class?

Answer:- B

Q4. Hiding internal data from the outside world, and accessing it only through
publicly exposed methods is known as data

Answer:- B

quizxp telegram

Q5. Consider the following piece of code in Java.

class Men
{

int walkingDistance(int weight)
{

System.out.println(10); 
return 10;

}
}
class WildMen extends Men
{
void walkingDistance(int weight)
{
    System.out.println("20");

}

} 
public class MethodOverriding3
{
public static void main(String[] args)
{
WildMen we = new WildMen(); 
we.walkingDistance(30);
}
}

Answer:- D

Q6. All the variables of interface should be?

Answer:- C

FOR PROGRAMMING ASSIGNMENT VISIT :- Programming In Java Assignment

Q7. Advantage(s) of inheritance in Java programming is/are

Answer:- A,B,C,D

Q8. When does method overloading is determined?

Answer:- B

Q9. Consider the following piece of code in Java.

public class Testl{
Test1() { 
    Testl obj1 = new Test1();
}

public static void main(String [] args) {
    Test1 obj = new Testl();
    System.out.println("Hello");
    
}
}

Answer:- B

Q10. Which of the following statement(s) is/are not true?

Answer:- C

Also check :- Internship oppurtinites

Note:- WE NEVER PROMOTE COPYING AND We do not claim 100% surety of answers, these answers are based on our sole knowledge and by posting these answers we are just trying to help students to reference, so we urge do you assignment own your own.