PROGRAM
|
BSc IT
|
SEMESTER
|
THIRD
|
SUBJECT CODE & NAME
|
BT0074, OOPS with JAVA
|
CREDIT
|
4
|
BK ID
|
B1002
|
MAX. MARKS
|
60
|
Dear
students get fully solved assignments
Send
your semester & Specialization name to our mail id :
“
help.mbaassignments@gmail.com ”
or
Call
us at : 08263069601
(Prefer
mailing. Call in emergency )
Q.
1. What are the keywords that java supports? Describe the datatypes available
in java programming language?
Answer:In the Java programming language, a
keyword is one of 50 reserved words that have a predefined meaning in the
language; because of this, programmers cannot use keywords as names for
variables, methods, classes, or as any other identifier. Due to their special
functions in the language, most integrated development environments for Java
use syntax highlighting to display keywords in a different color for easy
identification.The Java programming language is a statically typed language,
which means that every variable and every expression has a type that is known
at compile time.The Java programming language is also a strongly typed
Q. 2. Describe StringBuffer class in java. List all the
functionsrelevant to it and explain any five of them.
Answer:StringBuffer class is a mutable class
unlike the String class which is immutable. Both the capacity and character
string of a StringBuffer Class. StringBuffer can be changed dynamically. String
buffers are preferred when heavy modification of character strings is involved
(appending, inserting, deleting, modifying etc).
Strings
can be obtained from string buffers. Since the StringBuffer class does not
override the equals() method from the Object class, contents of string buffers
should be converted to String objects for string comparison.
A StringIndexOutOfBoundsException is thrown if an
A StringIndexOutOfBoundsException is thrown if an
Q.
3. Describe with the help of an example the implementation ofinheritance in
java.
Answer: Inheritance in Java is an Object oriented
or OOPS concepts, which allows to
emulate real world Inheritance behavior, Inheritance allows code reuse in
Object oriented programming language e.g. Java. Along with Abstraction,
Polymorphism and Encapsulation, Inheritance forms basis of Object oriented
programming. Inheritance is implemented using extends keyword in Java and When
one Class extends another Class it inherit all non private members including
fields and methods. Inheritance in Java can be best understand in terms of
Parent and Child
Q.
4. Describe the catch and finally block statement in java withexamples.
Answer: Java's finally block is useful in exception
handling and always used in conjunction with try block. There should at least
be one try block that finally block can be associated to. The try encloses a
block of code in which exception may occur. When a piece of code throws an
exception, it stops processing the remaining code in try block and transfers
the control to an appropriate catch block if a catch block exists (catch block
is optional), else control gets
Q.
5. Draw and Explain the Life cycle of a java applet with anexample.
Answer:Various states, an applet, undergoes
between its object creation and object removal (when the job is over) is known
as life cycle. Each state is represented by a method. There exists 5 states
represented by 5 methods. That is, in its life of execution, the applet exists
(lives) in one of these 5 states.
These
methods are known as "callback
Q.
6. Explain all the steps of running the beanbox.
Answer: JavaBeans are reusable software components
written in Java. These components may be built into an application using an
appropriate building environment. The Bean Development Kit (BDK) from Sun
includes a simple example of a building environment which uses beans, called
the beanbox, and some sample beans. This
note will tell you how to set up and use the BDK on the Computer Science &
Informatics Ubuntu Linux workstations and how to add your own beans to the
BeanBox environment.
Dear
students get fully solved assignments
Send
your semester & Specialization name to our mail id :
“
help.mbaassignments@gmail.com ”
or
Call
us at : 08263069601
(Prefer
mailing. Call in emergency )
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.