Home > Download > SMU - Question Paper
> MSc IT > MT0045
JAVA
This is the collection of
Sikkim Manipal University (SMU) question and answers for JAVA. It will help
to prepare your examination. All question paper are
classified as per semester, subject code and question type of Part A, Part B and Part C with
multiple
choice options
as same as actual examination. SMU question papers includes
year 2024, 2023, 2022 Sem I, II, III, IV, V, VI examinations
of all subjects.
SMU question test set of old,
last and previous year are updated
regularly and it is absolutely free to use. Question paper includes Visual basic 6, VB.Net, C#, ASP.Net,
Web, Oracle, Database, SQL, Software Engineering, C, C++, OOPS, MBA, MCA, BSC IT I have requested
you kindly send me the question paper of JAVA, SMU - Master of Science in Information Technology.
Course Name
MSc IT (Master of Science in Information Technology)
Subject Code MT0045 (JAVA)
Get Questions
PART - A
PART - B
PART - C
Subject : JAVA
MT0045 : PART - C
Q. 1 | The following, method takes a char input and returns an int value public int maze(char d)} if(d<='N'){ if(d=='E') return 2; return 1; } else if(d=='S') return 3; else if(d=='W') return 4; return 0; } |
| A) | Input of 'A' produces output of I |
| B) | Input of ‘X’ produces output of 0 | | C) | Q Input of 'E' produces output of 2 | | D) | The method fails to compile due to syntax
error | | | | Q. 2 | Trying to compile the following source code produces a compiler warning to the effect that the variable 'tmp' may not have been initialised. 1. class Demo { 2. public static void main (String args[]) 3. int n = -10; 4. String t |
| A) | Make line 4 read, String tmp=null; |
| B) | Make line 4 read String tmp=""; | | C) | Insert a line following line 5, else
tmp="not Positive"; | | D) | All of these changes will eliminate the
warning | | | | Q. 3 | In the following code for a class in which 'method' has an inner class, which variables would the statement in line 8 be unable to use in place of XXX? public class Base { static int aaa=3; Strin bbb = "Java"; public void metho |
| A) | aaa |
| B) | bbb | | C) | ccc | | D) | ddd | | | | Q. 4 | Assume that the following program has been compiled and Radio.class file is in the current directory. class Radio { public static void main(String args[j) { int n = 0; System.out.println ("The ray is "+args[++n]); } } < |
| A) | Radio alpha beta gamma |
| B) | java Radio gamma beta | | C) | java Radio alpha gamma | | D) | java Radio.class beta gamma | | | | Q. 5 | Given the following method that will be called with various input values: public void soundOff(int x){ switch(x){ case 1: System.out.print("One”) case 2: System.out.print(“Two”) break; case 3: Systern.out.print("Three "); defau |
| A) | Input = 0, Output = "Zero" |
| B) | Input = 1, Output = "One" | | C) | Input = 2, Output ~ "One Two" | | D) | Input = 3, Output = "Three Do What?" | | | |
Click here to get
JAVA (MT0045)
New Question
Home > Download > SMU - Question Paper
> MSc IT > MT0045