P2Pprogrammer 2 programmer

Home > Download > SMU - Question Paper > BCA > BC0047

Java Programming


This is the collection of Sikkim Manipal University (SMU) question and answers for Java Programming. 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 2022, 2021, 2020 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 Programming, SMU - Bachelor of Computer Application.

Course Name        BCA (Bachelor of Computer Application)

Subject Code       BC0047 (Java Programming)

Get Questions        PART - A    PART - B    PART - C

Subject : Java Programming

     BC0047 : PART - C    


Q. 1The 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. 2Trying 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. 3In 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. 4Assume 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. 5Given 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 Programming (BC0047) New Question


Home > Download > SMU - Question Paper > BCA > BC0047