Internet & Java Programming (MCA-314) Assignment No.2 Note: attempt all questions

estrapadesherbetΛογισμικό & κατασκευή λογ/κού

18 Νοε 2013 (πριν από 3 χρόνια και 11 μήνες)

88 εμφανίσεις


Kanpur Institute of Technology

Internet & Java Programming

(
MCA
-
31
4
)

Assignment No.2

Note: attempt all questions


Q.1
Why is Java is called machine independent language? Discuss the functionality of Java
Virtual machine.
Explain why Java is considered a
s the best language for Internet applications.

How

is Java more secure than other languages? Also write down the rules for creating identifiers
in Java.

Q.2
what

do you mean by classes and
objects?
Explain with suitable examples and how objects
and classes

are created in Java?

Discuss various primitive data types supported by Java.

Q.3
what are the unique advantage of an object oriented programming paradigm

Q.4

Write a program in Java to create first 100 Fibonacci numbers and
Write a Java program to
find th
e Armstrong numbers between 100 and 1000.In Armstrong numbers, the sum of the cubes
of the individual digits gave the same number.

For
example:

153 = 1
3
+5
3
+3
3

=1+125+27 =153

Q.5 what do you stand by Multithread programming within a simple suitable example.

Explain
the concept of multithreading with the help of a diagram .Write a program to display square and
cube of a number as independent thread
.

Q.6

when

do we declare a method or class
abstract?
Explain with example.

Q.7

what

is the difference between ove
rriding and overloading a
method?
Explain with suitable
examples.

Q.8
what

is the difference between implicit and explicit import
statement?
Which one takes less
time for compilation and
why?

Q.9 Explain

the
following:
(i) Thread and advantages of threading

(ii) Da
emon thread (iii)
Deadlock (iv)
Exception handling.
(v) Inheritance
,

difference between multilevel and multiple
inheritance.
(vi) Socket and proxy server

Q.
10
Write a program in Java to compute the transpose of a matrix. Write a stack class that
thro
ws an exception when the stack is full and handles the exception and display the message
“stack is full”.


Q.11

what

are the different types of statements available in
java?
Explain with suitable
examples.

What is vector? How does it differ from an array?

Q.12

Write

short notes on the
following:

(i) Wrapper class (ii) Separators in
Java (
iii) Java
Applet and life cycle of an applet

Q.13

Define the following terms in context of AWT.

(i) Canvas (ii) Event (iii) Frame (iv) Dialog (v) Button

Q.14

what

do yo
u understand by event handling in
Java?
Give example of Mouse
event,

Keyboard even and windows events.

Q.15

what

do you mean by Wrapper
Class?
Java defines a number of wrapper
classes

like
Integer, Float Double etc. to store numbers data. What advantages d
o these class offer.