Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Exam (elaborations) ₹100 (JAVA2)

Rating
-
Sold
-
Pages
24
Grade
B
Uploaded on
14-07-2025
Written in
2024/2025

Java is a computer language

Institution
Course

Content preview

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)



Winter – 19 EXAMINATION

Subject Name: Java Programming Model Answer Subject Code: 22412

Important Instructions to examiners:
1) The answers should be examined by key words and not as word-to-word as given in the
model answer scheme.
2) The model answer and the answer written by candidate may vary but the examiner may try
to assess the understanding level of the candidate.
3) The language errors such as grammatical, spelling errors should not be given more
Importance (Not applicable for subject English and Communication Skills.
4) While assessing figures, examiner may give credit for principal components indicated in the
figure. The figures drawn by candidate and model answer may vary. The examiner may give
credit for any equivalent figure drawn.
5) Credits may be given step wise for numerical problems. In some cases, the assumed constant
values may vary and there may be some difference in the candidate’s answers and model
answer.
6) In case of some questions credit may be given by judgement on part of examiner of relevant
answer based on candidate’s understanding.
7) For programming language papers, credit may be given to any other program based on
equivalent concept.

Q. Sub Answer Marking
No. Q. N. Scheme
1. Attempt any Five of the following: 10M
a Define Constructor. List its types. 2M
Ans Constructor: A constructor is a special member which initializes Definition:1Mark
an object immediately upon creation. It has the same name as Types: 1 Mark
class name in which it resides and it is syntactically similar to
any method. When a constructor is not defined, java executes a
default constructor which initializes all numeric members to zero
and other types to null or spaces. Once defined, constructor is
automatically called immediately after the object is created
before new operator completes.

Types of constructors:

1. Default constructor
2. Parameterized constructor
3. Copy constructor
b Define Class and Object. 2M




1|24

, MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)



Ans Class: A class is a user defined data type which groups data Definition 1
members and its associated functions together. Mark each

Object: It is a basic unit of Object Oriented Programming and
represents the real life entities. A typical Java program creates
many objects, which as you know, interact by invoking methods.

c List the methods of File Input Stream Class. 2M
Ans • void close() Any Two Each
• int read() for 1 Mark
• int read(byte[] b)
• read(byte[] b, int off, int len)
• int available()

d Define error. List types of error. 2M
Ans • Errors are mistakes that can make a program go wrong. Errors Definition: 1m
may be logical or may be typing mistakes. An error may List: 1m
produce an incorrect output or may terminate the execution of
the program abruptly or even may cause the system to crash.

Errors are broadly classified into two categories:

1. Compile time errors

2. Runtime errors
e List any four Java API packages. 2M
Ans 1.java.lang 1/2 Marks for
2.java.util one Package
3.java.io
4.java.awt
5.java.net
6.ava.applet


f Define array. List its types. 2M
Ans An array is a homogeneous data type where it can hold only Definition 1
objects of one data type. Mark, List 1
Mark
Types of Array:




2|24

, MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
(Autonomous)
(ISO/IEC - 27001 - 2013 Certified)



1)One-Dimensional

2)Two-Dimensional
g List access specifiers in Java. 2M
Ans 1)public Any 2, 1M for
each
2)private

3)friendly

4)protected

5)Private Protected

2. Attempt any Three of the following: 12M
a Differentiate between String and String Buffer. 4M
Ans Any 4 Points
String String Buffer c 4 Marks

String is a major class String Buffer is a peer class
of String

Length is fixed (immutable) Length is flexible (mutable)

Contents of object cannot be Contents of object can be
modified modified

Object can be created by Objects can be created by
assigning String constants calling constructor of String
enclosed in double quotes. Buffer class using “new”

Ex:- String s=”abc”; Ex:- StringBuffer s=new
StringBuffer (“abc”);



b Define a class circle having data members pi and radius.
Initialize and display values of data members also calculate
area of circle and display it.
Ans class abc correct
Program with
{ correct logic 4
Mark




3|24

Written for

Institution
Course

Document information

Uploaded on
July 14, 2025
Number of pages
24
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$180.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
vaibhavimore

Also available in package deal

Get to know the seller

Seller avatar
vaibhavimore Goverment polytechnic
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
9 months
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions