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 2025, 2024, 2023 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. 1Trying 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. 2The 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. 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. 4You are writing a set of classes related
to Marks Report and have created your own
exception hierarchy derived from
java.lang.Exception as follows:
java.lang.Exception
+-- MarksException
+--OutOfRangeException
Your custom excep
 A)new OutOfRangeException ("Marks is not in the Range");
 B)throws new OutOfRangeException ("Marks is not in the Range");
 C)throw new OutOfRangeExcep tion ("Marks is not in the Range");
 D)throw OutOfRangeException ("Marks is not in the Range");
   
Q. 531. Select correct Syntaxes
1. for (initialization; test condition; modifier
expression;)
2. for (initialization1, initialization2;
test conditon1, test condition2;
modifier1, modifier2)
{ body of the loop};
3. while (test cond
 A)1
 B)1 and 2
 C)2, 3
 D)All the above
   
Click here to get Java Programming (BC0047) New Question


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