Mumbai University Solved Question Papers munotes.in
JAVA Programming
BSc CS · Sem 3
Nov 2024 Examination
Previous Year Question Paper with Solution
munotes.in Mumbai
Mumbai University Solved Question Papers munotes.in
JAVA Programming
BSc CS · Sem 3
Nov 2024 Examination
Previous Year Question Paper with Solution
munotes.in Mumbai
First published on munotes.in on 12 November 2026.
Published by munotes.in, Mumbai.
Model answers written and edited by the munotes.in editorial desk.
Passages from this volume may be quoted, in print, online or by an AI system, with credit: name munotes.in and link to this volume's page. The volume may not be reproduced as a whole. Full terms at munotes.in/content-license.
munotes.in is an independent study resource for students of the University of Mumbai. It is not affiliated with the University of Mumbai, and is not endorsed by it.
The University does not publish an official answer key for this paper. The answers in this volume are model answers, written to show how a full-mark answer is built. They are a study aid, not an authority on what an examiner marked.
The question paper reproduced here is the paper as set by the University of Mumbai at the Nov 2024 examination.
The questions below are the paper as the University of Mumbai set it at the Nov 2024 examination, in the order it was set.
MarksPage
MarksPage
The questions in this volume are the questions asked at the Nov 2024 examination, reproduced as the University of Mumbai set them, in the order it set them. Nothing has been reworded, added or left out. Only the answers are ours. See the original question paper.
Duration 2½ hours · Total marks 75 · 24 questions answered
How to use this volume
Solve the paper first, under exam conditions and against the clock. Then read the answers here and mark your own. Reading a solution before attempting the question feels productive and teaches very little, because recognising an answer is not the same as being able to write one.
QI)
Attempt any four, 5 marks each · 20 Marks
Answer
For full marks, cover: the two terms defined; the compile-to-bytecode, run-on-a-JVM path as a labelled diagram; the fixed sizes of the primitive types; the specified class file format; "write once, run anywhere"; a short program whose output is the same on every machine; and the limits.
Java gets both from one design: it compiles to bytecode, not to machine code.
javac compiles Hello.java into Hello.class. The class file holds bytecode, the instruction set of an imaginary machine, the Java Virtual Machine (JVM).int is always 32 bits, a long 64, a char 16 and a double 64. In C, an int may be 16 or 32 bits depending on the machine.Diagram: Hello.java goes into a box "javac". An arrow leads to Hello.class (bytecode). From it, three arrows fan out to three boxes, "JVM on Windows", "JVM on Linux" and "JVM on macOS". Each box sits on its own hardware.
This is the slogan "write once, run anywhere".
public class Sizes { public static void main(String[] args) { System.out.println("int " + Integer.SIZE + " bits, long " + Long.SIZE + " bits"); System.out.println("char " + Character.SIZE + " bits, double " + Double.SIZE + " bits"); }}Output:
int 32 bits, long 64 bitschar 16 bits, double 64 bits
The same Sizes.class prints these lines on every operating system, because the sizes are part of the language.
C:\data, loses portability.Conclusion. Java is architecture-neutral because it compiles to bytecode for the JVM, not for a processor. It is portable because the class file format, the primitive sizes and the library are fixed, so one class file runs the same everywhere.
The rest of the answers
You have read the question paper and its first answer in full. Buy the solved papers once and you can read every answer of every solved paper in this semester.
Notes + practical solutions + solved papers: ₹798 Already bought it? Sign in
Or solved papers only: ₹499
Or notes + practical solutions: ₹499
The question paper itself stays free, and so does the syllabus.
What should we fix or add?
Found an error in this volume? Report it and we will check it against the paper.