Exam Details
Subject | programming with java | |
Paper | ||
Exam / Course | mca | |
Department | ||
Organization | Gujarat Technological University | |
Position | ||
Exam Date | January, 2019 | |
City, State | gujarat, ahmedabad |
Question Paper
Seat No.: Enrolment
GUJARAT TECHNOLOGICAL UNIVERSITY
MCA SEMESTER- III EXAMINATION WINTER 2018
Subject Code: 3630005 Date: 09-01-2019
Subject Name: Programming with Java
Time: 10.30 am to 1.00 pm Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
Q.1(A)
Specify whether the following statements are True or False. If False then
correct it.
1. Each object has its own copy of the static variables defined in the class.
2. Always a super class constructor must execute before a subclass constructor.
3. A class can extend from more than one super class.
4. We can create our own sub-class of the java.lang.Math class.
5. To call the parent class constructor explicitly, super() and this() both are use together.
6. The size of char data type is 1 byte.
7. The toString() method can be overridden to be protected.
07
Q.1
Attempt the following
1. Class defined in Java without using extends keyword having
parent(super) class. Why?
2. It is not compulsory to import java.lang package in Java source file. Why?
3. After execution of following statements, value of b is not 333. Why?
int i 333;
byte b
4. Discuss the features of Java
5. Explain importance of Constructor
01
01
01
02
02
Q.2(A)
What are Wrapper classes? Explain boxing and unboxing with example
07
Q.2
Define package. Explain the steps to and important and create package
07
OR
Q.2
Explain life cycle of Applet with proper example
07
Q.3(A)
1.Explain the difference between subtypes and supertypes with example
2. Differentiate character stream and byte stream.
03
04
Q.3
What is an exception? Explain different types is an exception? Discuss "try", "catch", "finally", "throw" and "throws" with suitable java code
07
OR
Q.3
Explain the difference between runtime errors and compile time errors with example.
07
Q.3
Difference between static and instance variable with example.
07
Q.4(A)
1. To display "Hello India" on frame.
2. To display weekdays along with its description using enum data type.
Weekdays Description
Sunday Sun
Monday Moon
Tuesday Mars
Wednesday Mercury
Thursday Jupiter
Friday Venus
Saturday Saturn
04
03
Q.4
Write program for following.
1. To display contents of text file on console if file exist. Provide file name from command-line argument.
2. To find average of values given as a command-line arguments. Also write necessary exception handling code
04
03
OR
Q.4(A)
What is difference between Vector and Hashtable class? How the Enumeration
interface is useful in Java explain with code?
07
Q.4
1. What is container and component class in Java? Specify different types of components with its events?
2. Explain final, native and synchronized method modifier.
04
03
Q.5
What is CLASSPATH? How it is important?
07
Q.5
Define Thread. How different way thread is created in Java? Discuss the Thread life cycle with suitable example of java program code.
07
OR
Q.5(A)
Write program for following.
1. To copy file using character stream. Provide source file name and destination file name using command-line arguments.
2. To create two different threads. One thread to display odd numbers between 1 to 40 at every 1 second and other thread to display even numbers between 1 to 20 at every 2 seconds.
04
03
Q.5
Explain final, native and synchronized method modifier.
07
GUJARAT TECHNOLOGICAL UNIVERSITY
MCA SEMESTER- III EXAMINATION WINTER 2018
Subject Code: 3630005 Date: 09-01-2019
Subject Name: Programming with Java
Time: 10.30 am to 1.00 pm Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
Q.1(A)
Specify whether the following statements are True or False. If False then
correct it.
1. Each object has its own copy of the static variables defined in the class.
2. Always a super class constructor must execute before a subclass constructor.
3. A class can extend from more than one super class.
4. We can create our own sub-class of the java.lang.Math class.
5. To call the parent class constructor explicitly, super() and this() both are use together.
6. The size of char data type is 1 byte.
7. The toString() method can be overridden to be protected.
07
Q.1
Attempt the following
1. Class defined in Java without using extends keyword having
parent(super) class. Why?
2. It is not compulsory to import java.lang package in Java source file. Why?
3. After execution of following statements, value of b is not 333. Why?
int i 333;
byte b
4. Discuss the features of Java
5. Explain importance of Constructor
01
01
01
02
02
Q.2(A)
What are Wrapper classes? Explain boxing and unboxing with example
07
Q.2
Define package. Explain the steps to and important and create package
07
OR
Q.2
Explain life cycle of Applet with proper example
07
Q.3(A)
1.Explain the difference between subtypes and supertypes with example
2. Differentiate character stream and byte stream.
03
04
Q.3
What is an exception? Explain different types is an exception? Discuss "try", "catch", "finally", "throw" and "throws" with suitable java code
07
OR
Q.3
Explain the difference between runtime errors and compile time errors with example.
07
Q.3
Difference between static and instance variable with example.
07
Q.4(A)
1. To display "Hello India" on frame.
2. To display weekdays along with its description using enum data type.
Weekdays Description
Sunday Sun
Monday Moon
Tuesday Mars
Wednesday Mercury
Thursday Jupiter
Friday Venus
Saturday Saturn
04
03
Q.4
Write program for following.
1. To display contents of text file on console if file exist. Provide file name from command-line argument.
2. To find average of values given as a command-line arguments. Also write necessary exception handling code
04
03
OR
Q.4(A)
What is difference between Vector and Hashtable class? How the Enumeration
interface is useful in Java explain with code?
07
Q.4
1. What is container and component class in Java? Specify different types of components with its events?
2. Explain final, native and synchronized method modifier.
04
03
Q.5
What is CLASSPATH? How it is important?
07
Q.5
Define Thread. How different way thread is created in Java? Discuss the Thread life cycle with suitable example of java program code.
07
OR
Q.5(A)
Write program for following.
1. To copy file using character stream. Provide source file name and destination file name using command-line arguments.
2. To create two different threads. One thread to display odd numbers between 1 to 40 at every 1 second and other thread to display even numbers between 1 to 20 at every 2 seconds.
04
03
Q.5
Explain final, native and synchronized method modifier.
07
Other Question Papers
Subjects
- advance database management system
- advanced biopharmaceutics & pharmacokinetics
- advanced medicinal chemistry
- advanced networking (an)
- advanced organic chemistry -i
- advanced pharmaceutical analysis
- advanced pharmacognosy-1
- advanced python
- android programming
- artificial intelligence (ai)
- basic computer science-1(applications of data structures and applications of sql)
- basic computer science-2(applications of operating systems and applications of systems software)
- basic computer science-3(computer networking)
- basic computer science-4(software engineering)
- basic mathematics
- basic statistics
- big data analytics (bda)
- big data tools (bdt)
- chemistry of natural products
- cloud computing (cc)
- communications skills (cs)
- computer aided drug delivery system
- computer graphics (cg)
- computer-oriented numerical methods (conm)
- cyber security & forensics (csf)
- data analytics with r
- data mining
- data structures (ds)
- data visualization (dv)
- data warehousing
- data warehousing & data mining
- database administration
- database management system (dbms)
- design & analysis of algorithms(daa)
- digital technology trends ( dtt)
- discrete mathematics for computer science (dmcs)
- distributed computing (dc1)
- drug delivery system
- dynamic html
- enterprise resource planning (erp)
- food analysis
- function programming with java
- fundamentals of computer organization (fco)
- fundamentals of java programming
- fundamentals of networking
- fundamentals of programming (fop)
- geographical information system
- image processing
- industrial pharmacognostical technology
- information retrieving (ir)
- information security
- java web technologies (jwt)
- language processing (lp)
- machine learning (ml)
- management information systems (mis)
- mobile computing
- molecular pharmaceutics(nano tech and targeted dds)
- network security
- object-oriented programming concepts & programmingoocp)
- object-oriented unified modelling
- operating systems
- operation research
- operations research (or)
- pharmaceutical validation
- phytochemistry
- procedure programming in sql
- programming skills-i (ps-i-fop)
- programming skills-ii (ps-oocp)
- programming with c++
- programming with java
- programming with linux, apache,mysql, and php (lamp)
- programming with python
- search engine techniques (set)
- soft computing
- software development for embedded systems
- software engineering
- software lab (dbms: sql & pl/sql)
- software project in c (sp-c)
- software project in c++ (sp-cpp)
- software quality and assurance (sqa)
- statistical methods
- structured & object oriented analysis& design methodology
- system software
- virtualization and application of cloud
- web commerce (wc)
- web data management (wdm)
- web searching technology and search engine optimization
- web technology & application development
- wireless communication & mobile computing (wcmc)
- wireless sensor network (wsn)