CS506 – Enterprise Application Development: Midterm Important MCQs (304 Solved Questions)

Computer Science • Read every solved MCQ with its verified answer key directly on this page. Free, no login required.

All 664 Midterm Packs · CS506 Course Page · CS506 Subjective Pack (34 Q&As)

  1. A class that is defined in another class is called
    Topic: Java Basics & OOP
    1. Private class
    2. Public class
    3. Inner class ✓ Correct answer
    4. Derived class
  2. A member variable or method prefixed by the protected access modifier can be accessed:
    Topic: Java Basics & OOP
    1. Within the same class
    2. Within the sub-class
    3. Within the same package
    4. All of the above ✓ Correct answer
  3. An abstract class --------------- instantiated.
    Topic: Java Basics & OOP
    1. Cannot be ✓ Correct answer
    2. Can be
    3. Must
    4. None of these
  4. Based on functionality, the streams can be categorized as
    Topic: Java Basics & OOP
    1. Byte oriented stream and Node stream
    2. Filter stream and Character oriented stream
    3. Node stream and Filter stream ✓ Correct answer
    4. Byte oriented stream and Character oriented stream
  5. DML stands for?
    Topic: Java Basics & OOP
    1. Data Manipulation Language ✓ Correct answer
    2. Data Management Language
    3. Direct Manipulation Language
    4. Direct Management Language
  6. HashMap takes key as a/an
    Topic: Java Basics & OOP
    1. Object ✓ Correct answer
    2. Array
    3. Primitive value
    4. Function
  7. Java developed in
    Topic: Java Basics & OOP
    1. 1990
    2. 1995 ✓ Correct answer
    3. 1997
    4. 2000
  8. Node stream fall into which category of streams?
    Topic: Java Basics & OOP
    1. Character
    2. Byte ✓ Correct answer
    3. Integer
    4. Double
  9. The relationship between class and interface is called
    Topic: Java Basics & OOP
    1. ‘Is a' relationship
    2. ' Has a' relationship
    3. ' Responds to ' relationship ✓ Correct answer
    4. None of the given options
  10. Which of the following is true about abstract class?
    Topic: Java Basics & OOP
    1. An abstract class must have all methods declared as abstract methods
    2. Aclass must have at least one abstract method to be an abstract class
    3. A class without any abstract method can be declared as abstract class ✓ Correct answer
    4. An instance of abstract class can be created
  11. Which one of the following blocks always executes irrespective of exception occurrence?
    Topic: Java Basics & OOP
    1. Try block
    2. Catch block
    3. Throws block
    4. Finally block ✓ Correct answer
  12. A final class can't be extended.
    Topic: Java Basics & OOP
    1. True ✓ Correct answer
    2. False
  13. A serializable class must implement the method(s)
    Topic: Java Basics & OOP
    1. readObject and writeObject
    2. Either readObject or writeObject, or both, depending upon the desired behavior
    3. No need to implement any method ✓ Correct answer
    4. None of the given option
  14. Aside from the Scanner class, which of the following classes can be used for text-file file input?
    Topic: Java Basics & OOP
    1. ObjectInputStream
    2. Buffered Reader ✓ Correct answer
    3. StringTokenizer
    4. None of these
  15. From the following; which approach is used in java to create threads,
    Topic: Java Basics & OOP
    1. Interface
    2. Inheritance
    3. Both Interface and Inheritance ✓ Correct answer
    4. None of these
  16. Java program’s code is compiled into a form called_ .
    Topic: Java Basics & OOP
    1. Machine code
    2. Byte code ✓ Correct answer
    3. Native code
    4. Source code
  17. The classes which contain the word _in their names are byte oriented streams.
    Topic: Java Basics & OOP
    1. Reader
    2. Writer
    3. Stream ✓ Correct answer
    4. Byte
  18. The collection API are defined in package.
    Topic: Java Basics & OOP
    1. java.io
    2. java.util ✓ Correct answer
    3. java.awt
    4. java.sql
  19. What if the main method is declared as private?
    Topic: Java Basics & OOP
    1. The program does not compile
    2. The program compiles but does not run ✓ Correct answer
    3. The program compiles and runs properly
    4. The program throws an exception on compile time
  20. Which of the following feature provides the facility for multiple inheritance?
    Topic: Java Basics & OOP
    1. Adapter classes
    2. Wrapper classes
    3. Interfaces ✓ Correct answer
    4. Collections
  21. Which of the following is modifier is provided by default if no access is written explicitly?
    Topic: Java Basics & OOP
    1. public
    2. Private
    3. Protected
    4. Default ✓ Correct answer
  22. Which of the following must be used to compare the values of two strings?
    Topic: Java Basics & OOP
    1. = operator
    2. == operator
    3. equals() method ✓ Correct answer
    4. compare() method
  23. == operator compares of strings whereas equals() method compares of strings.
    Topic: Java Basics & OOP
    1. Values, addresses
    2. Addresses, values ✓ Correct answer
    3. Size, addresses
    4. Addresses, size
  24. A _______________ defines the way and method of communication between two parties.
    Topic: Java Basics & OOP
    1. Compiler
    2. Protocol ✓ Correct answer
    3. Tool
    4. Technique
  25. A collection can store..........
    Topic: Java Basics & OOP
    1. Homogenous objects
    2. Heterogeneous objects ✓ Correct answer
    3. Objects as well as primitive values
    4. At most 100 objects
  26. A hash map object is to create, to store Teacher objects as values and their CNIC in the form of strings as keys.Which syntax is correct for this requirement?
    Topic: Java Basics & OOP
    1. HashMap<String> h =new HashMap<String=();
    2. HashMap<String, Teacher> h =new HashMap<String, Teacher>(); ✓ Correct answer
    3. HashMap<Teacher> h =new HashMap<String, Teacher>();
    4. HashMap<Teacher> h =new HashMap<Teacher>();
  27. A in HashMap is associated with each object that is stored.
    Topic: Java Basics & OOP
    1. None of the given options
    2. Key ✓ Correct answer
    3. Value
    4. Attribute
  28. A top level class may have only the following access modifier.
    Topic: Java Basics & OOP
    1. Package
    2. Private
    3. Protected
    4. Public ✓ Correct answer
  29. A top level class without any modifier is accessible to
    Topic: Java Basics & OOP
    1. any class
    2. any class within the same package ✓ Correct answer
    3. any class within the same file
    4. any subclass of this class
  30. A variable declared as static in a class is a/an
    Topic: Java Basics & OOP
    1. Instance variable
    2. Class variable ✓ Correct answer
    3. Const variable
    4. Global variable
  31. All java files in a directory are compiled using command in command prompt.
    Topic: Java Basics & OOP
    1. javac *.java ✓ Correct answer
    2. javac all.java
    3. javac all
    4. java *.java
  32. All the exceptions and errors in java are inherited from class.
    Topic: Java Basics & OOP
    1. Exception
    2. Error
    3. Throwable ✓ Correct answer
    4. IOException
  33. An exception in java is represented as a/an
    Topic: Java Basics & OOP
    1. Operator
    2. Object ✓ Correct answer
    3. Function
    4. None
  34. An instance of abstract class cannot be created.
    Topic: Java Basics & OOP
    1. TRUE ✓ Correct answer
    2. FALSE
  35. An object of Student java class is creating and setting its value in Test.java class. error is there in given code. public class Test{ public static void main (String args[]}{ Student s2 = new Student(); s2->setName(“Aslam”); }
    Topic: Java Basics & OOP
    1. Class name is in wrong format
    2. s2 is not valid name of object of Student class
    3. setName method should not be accessed by arrow operator ✓ Correct answer
    4. no syntax error
  36. Array List can store objects of _?
    Topic: Java Basics & OOP
    1. Same types only
    2. Different types only
    3. Both same and different types ✓ Correct answer
    4. Can't store objects
  37. ArrayList is an example of collection type.
    Topic: Java Basics & OOP
    1. Sequence based ✓ Correct answer
    2. Set based
    3. Hashmap based
    4. None of the given
  38. Assume that we do not want to serialize phoneNum attribute of Personinfo class, this can be done by;
    Topic: Java Basics & OOP
    1. server String phoneNum;
    2. client String phoneNum;
    3. transient String phoneNum; ✓ Correct answer
    4. serializable String phoneNum:
  39. By implementing this interface, a class declares that it is willing to be by automatic serialization machinery.
    Topic: Java Basics & OOP
    1. Checked
    2. Decode
    3. Read ✓ Correct answer
    4. Destroyed
  40. Bytecodes are created and stored on disk by .
    Topic: Java Basics & OOP
    1. editor
    2. compiler ✓ Correct answer
    3. class loader
    4. bytecode verifier
  41. Bytecodes are put in memory by _.
    Topic: Java Basics & OOP
    1. Editor
    2. compiler
    3. class loader ✓ Correct answer
    4. bytecode verifier
  42. Choose the correct syntax to declare an abstract java classnamed as "Person".
    Topic: Java Basics & OOP
    1. abstract public class Person{}
    2. public class Person abstract{}
    3. public class abstract Person{}
    4. public abstract class Person{} ✓ Correct answer
  43. CmdArgs java class is compiled. If the command “java CmdArgs CS506” run in cmd, then what will be output of given code. Public class CmdArgs{ public static void main(String[] args){ System.out.println(“First argument” + args[0]); }
    Topic: Java Basics & OOP
    1. CS506 ✓ Correct answer
    2. Syntax error
    3. do not show any output
    4. args[0]
  44. Consider the following code segment. ArrayList al = new ArrayList(); Person p = new Person() ; al.add(p); What will be the syntax to get an object from the first index of ArrayList?
    Topic: Java Basics & OOP
    1. Person p = al.get(0) ;
    2. Person p = al.get(1) ;
    3. Person p = (Person)al.get(0) ; ✓ Correct answer
    4. Person p = (Person)al.get(1) ;
  45. Converting a bigger data type into smaller data type is called _.
    Topic: Java Basics & OOP
    1. Up-casting
    2. Down-casting ✓ Correct answer
    3. Normal-casting
    4. High-casting
  46. DDL stands for?
    Topic: Java Basics & OOP
    1. Data Definition Language ✓ Correct answer
    2. Data Driven Language
    3. Database Definition Language
    4. Database Driven Language
  47. Exception handling code is written in _
    Topic: Java Basics & OOP
    1. try block
    2. catch block ✓ Correct answer
    3. finally block
    4. throws clause
  48. Exceptions must be handled while handling files otherwise it may lead to
    Topic: Java Basics & OOP
    1. Logical error
    2. Syntax error
    3. Run-time error ✓ Correct answer
    4. No error
  49. For each class contained in java source file, compiler generates class file/s.
    Topic: Java Basics & OOP
    1. One ✓ Correct answer
    2. Two
    3. Three
    4. Four
  50. From following classes; which one can’t be instantiated?
    Topic: Java Basics & OOP
    1. Super class
    2. Abstract Class ✓ Correct answer
    3. Anonymous Class
    4. Concrete Class
  51. From following; which is the main reason that enters a thread into dead state:
    Topic: Java Basics & OOP
    1. It dies a natural death because thread completes its execution
    2. It is killed because someone invoked its stop method
    3. Both a and b.. ✓ Correct answer
    4. None of these
  52. Given a one dimensional array arr, what is the correct way of getting the number of elements in arr
    Topic: Java Basics & OOP
    1. arr.length ✓ Correct answer
    2. arr.length — 1
    3. arr.size — 1
    4. arr.lengthO
  53. Given code is showing the result of addition of two integer type numbers. Choose correct output of this code. Int i = 7; int j = 8; int k = i+j; System.out.printIn(“Seven” + i + “plus Eight” + j + “is” + k);
    Topic: Java Basics & OOP
    1. Seven 7 plus Eight 8 is 15 ✓ Correct answer
    2. Seven i plus Eight j is k
    3. Seven i plus Eight j is +15
    4. Seven plus Eight is k
  54. How many methods are there in the Serializable Interface?
    Topic: Java Basics & OOP
    1. Zero ✓ Correct answer
    2. One
    3. Two
    4. Three
  55. INSERT, UPDATE, DELETE are statements.
    Topic: Java Basics & OOP
    1. DDL
    2. DML ✓ Correct answer
    3. DCL
    4. None of given
  56. If a class implements an interface then_
    Topic: Java Basics & OOP
    1. an interface must provide implementation of all methods
    2. a class may or may not provide implementation of all methods of interface
    3. a class must provide implementation of all methods of interface ✓ Correct answer
    4. class will compile successfully if class do not implements methods of interface
  57. If a super class method is protected then overriding method_
    Topic: Java Basics & OOP
    1. must be protected
    2. must be public
    3. must be private
    4. may be either protected or public ✓ Correct answer
  58. If the subclass overrides all the abstract methods of super class, then subclass is called _.
    Topic: Java Basics & OOP
    1. Abstract class
    2. Concrete class ✓ Correct answer
    3. Base class
    4. Parent class
  59. If there is a class "Student", then the java file must be saved with name.
    Topic: Java Basics & OOP
    1. Student_File java
    2. student.java
    3. Any name
    4. Student.java ✓ Correct answer
  60. If there is no exception in the try nor then the catch block executes.
    Topic: Java Basics & OOP
    1. Always
    2. Sometime
    3. Never ✓ Correct answer
    4. None of the given
  61. If we do not provide implementation of any one method of interface in a class that implements interface , class will:
    Topic: Java Basics & OOP
    1. Provide default implementation
    2. Not compile
    3. Run having no error
    4. Become abstract ✓ Correct answer
  62. If we remove String array from main then program
    Topic: Java Basics & OOP
    1. Program cannot compile
    2. Program will compile and work properly
    3. Run time errors ✓ Correct answer
    4. Exception throws in main
  63. If we remove static from main then program
    Topic: Java Basics & OOP
    1. Program cannot compile
    2. Program will compile and work properly
    3. Run time errors ✓ Correct answer
    4. Exception throws in main
  64. If we want to call toString() method of parent class in JAVA. Which of the following statement will be used?
    Topic: Java Basics & OOP
    1. this. toString();
    2. new. toString();
    3. sub. toString();
    4. super.toString(); ✓ Correct answer
  65. If you want the timer to fire only the first time and then stop, invoke .
    Topic: Java Basics & OOP
    1. setRepeats(false) ✓ Correct answer
    2. setRepeats(true)
    3. setOnce(false)
    4. setOnce(true)
  66. In Java an abstract class cannot be sub-classed
    Topic: Java Basics & OOP
    1. True
    2. False ✓ Correct answer
  67. In Java garbage collection is done by
    Topic: Java Basics & OOP
    1. JVM (Java Virtual Machine) ✓ Correct answer
    2. Programmer
    3. Both JVM (Java Virtual Machine)and Programmer
    4. OS (Operating System) e. None of given
  68. In Java, Serializable Interface can be found under package.
    Topic: Java Basics & OOP
    1. java.io ✓ Correct answer
    2. java.net
    3. java.sql
    4. java.util
  69. In Java, Transient fields are returned as null on reading.
    Topic: Java Basics & OOP
    1. True ✓ Correct answer
    2. False
  70. In editor java programs are created while stored on/in .
    Topic: Java Basics & OOP
    1. Disk ✓ Correct answer
    2. primary memory
    3. external file
    4. usb
  71. In given lines of code Employee is super class, Teacher is child class, is apply Employee e = new Teacher():
    Topic: Java Basics & OOP
    1. upcasting Teacher to Employee type ✓ Correct answer
    2. upcasting Employee to Teacher type
    3. downcasting Teacher to Employee type
    4. downcasting Employee to Teacher type
  72. In given lines of code, ______ is applying. double a = 9.5; int b = (int) a;
    Topic: Java Basics & OOP
    1. upcasting a to b type
    2. upcasting b to a type
    3. downcasting a to b type ✓ Correct answer
    4. downcasting b to a type
  73. In given lines of code, is applying. int a = 20: double b = a;
    Topic: Java Basics & OOP
    1. upcasting a to b type ✓ Correct answer
    2. upcasting b to a type
    3. downcasting a to b type
    4. downcasting b to a type
  74. In multi tier architecture object transfer can only happen if one of the following statements about objects is correct?
    Topic: Java Basics & OOP
    1. Objects should be always present.
    2. Objects reference should be set.
    3. Objects should be abstract.
    4. Objects need to be serialized. ✓ Correct answer
  75. In polymorphism, ______ are overridden.
    Topic: Java Basics & OOP
    1. Variables
    2. Methods ✓ Correct answer
    3. Data types
    4. Classes
  76. IndexOutOfBoundsExceptoin occurs when:
    Topic: Java Basics & OOP
    1. File is not present.
    2. Incorrect data type conversion is forced to do.
    3. Command line arguments are not passed. ✓ Correct answer
    4. Number is divided by zero.
  77. Interface imposes structure on any class that uses interface
    Topic: Java Basics & OOP
    1. code
    2. design ✓ Correct answer
    3. implementation
    4. inheritance
  78. It is verified by that not all bytecodes violate java security restrictions.
    Topic: Java Basics & OOP
    1. Editor
    2. Compiler
    3. class loader
    4. bytecode verifier ✓ Correct answer
  79. Java compiler handles __________ exceptions by default.
    Topic: Java Basics & OOP
    1. Checked
    2. Unchecked
    3. Both checked and unchecked ✓ Correct answer
    4. None of the given
  80. Java core language is than C++.
    Topic: Java Basics & OOP
    1. Simpler ✓ Correct answer
    2. Difficult
    3. Complex
    4. Less secure
  81. Java does not handle exception by as keyword.
    Topic: Java Basics & OOP
    1. try
    2. catch
    3. exception ✓ Correct answer
    4. finally
  82. Java is a _ language.
    Topic: Java Basics & OOP
    1. Complicated
    2. Not portable
    3. Static
    4. Multi threaded ✓ Correct answer
  83. Java language has a little worse performance than C++ language, because
    Topic: Java Basics & OOP
    1. it is object oriented
    2. it uses built in libraries ✓ Correct answer
    3. it does not use pointers
    4. it checks all errors, malicious and viruses
  84. Java provide
    Topic: Java Basics & OOP
    1. Overloading
    2. Overriding ✓ Correct answer
    3. Pointers
    4. Multiple Inheritance
  85. Objects are always written /read in which of the following form.
    Topic: Java Basics & OOP
    1. method
    2. variables
    3. class
    4. binary ✓ Correct answer
  86. Overloading is _whereas overriding is
    Topic: Java Basics & OOP
    1. Run time binding, compile time binding
    2. Late binding, compile time binding
    3. Compile time binding, run time binding ✓ Correct answer
    4. Run time binding, late time binding
  87. Static methods can only access
    Topic: Java Basics & OOP
    1. Instance variables
    2. Instance methods
    3. Static variables and methods ✓ Correct answer
    4. Both static and instance members
  88. Strings in java are represented as
    Topic: Java Basics & OOP
    1. Primitive data types
    2. Reference data types ✓ Correct answer
    3. Native data types
    4. Operators
  89. Suppose strings are stored in a collection “arraylist”. Get one string element and store in element variable. Choose correct line of code for this requirement.
    Topic: Java Basics & OOP
    1. String element = String arraylist.get(i);
    2. String element = (String)arraylist.get(i); ✓ Correct answer
    3. String element = element arraylist.get(i);
    4. String element = (element) arraylist.get(i);
  90. Teacher java class wants to inherit from Employee.java class, keyword should public static void main (String args[]){ }}
    Topic: Java Basics & OOP
    1. inherit
    2. implement
    3. extends ✓ Correct answer
    4. override
  91. The following is an example of . BufferedReaderbr = new BufferedReader(fr);
    Topic: Java Basics & OOP
    1. Byte oriented stream
    2. Node stream
    3. Filter stream ✓ Correct answer
    4. File stream
  92. The following is an example of _. FileReaderfr = new FileReader(“input txt”);
    Topic: Java Basics & OOP
    1. Byte oriented stream
    2. Node stream ✓ Correct answer
    3. Filter stream
    4. File stream
  93. The given line of code will result in System.out.println(5+9);
    Topic: Java Basics & OOP
    1. 59
    2. 5+9
    3. 14 ✓ Correct answer
    4. Syntax error
  94. The is directly connected with keyboard.
    Topic: Java Basics & OOP
    1. File stream
    2. Character oriented stream
    3. Node stream ✓ Correct answer
    4. Filter stream
  95. The keyword "this" is used to
    Topic: Java Basics & OOP
    1. invoke constructor of the another class
    2. invoke alternate constructor of the same class ✓ Correct answer
    3. invoke constructor of super class from sub class
    4. invoke constructor of sub class from super class
  96. The method "Math.random()" returns positive double value greater than or equal to 1 or less than 10.
    Topic: Java Basics & OOP
    1. True
    2. False ✓ Correct answer
  97. The output of given someTest function is _. public void someTest( ) { int x; System.out.printIn(x); }
    Topic: Java Basics & OOP
    1. x
    2. syntax error
    3. compile time error ✓ Correct answer
    4. run time error
  98. The toString() method returns a representation of .
    Topic: Java Basics & OOP
    1. int,string
    2. string,int
    3. string,object ✓ Correct answer
    4. object,string
  99. There are types of exceptions in Java
    Topic: Java Basics & OOP
    1. 2 ✓ Correct answer
    2. 3
    3. 4
    4. 5
  100. Timer class constructor requires time in _.
    Topic: Java Basics & OOP
    1. seconds
    2. milli seconds ✓ Correct answer
    3. micro seconds
    4. nano seconds
  101. To compile "Test.java" class, command is used in java.
    Topic: Java Basics & OOP
    1. javac Test.java ✓ Correct answer
    2. javac Test
    3. java Test.java
    4. java Test
  102. To make sure array accesses touch only the memory allocated to them, JVM does checking at runtime.
    Topic: Java Basics & OOP
    1. dynamic ✓ Correct answer
    2. static
    3. consistent
    4. not
  103. What will be the output of following statement? System.out.println(29+5);
    Topic: Java Basics & OOP
    1. 34 ✓ Correct answer
    2. 29+5
    3. 295
    4. None of the given options
  104. What will happen if static modifier is removed from the signature of main method?
    Topic: Java Basics & OOP
    1. The program does not compile
    2. The program compiles and runs successfully
    3. The program compiles but does not run ✓ Correct answer
    4. None of given options
  105. When there is just a onetime use of a particular object of a java class, we use _.
    Topic: Java Basics & OOP
    1. named object
    2. anonymous object ✓ Correct answer
    3. either named object or anonymous object
    4. either named object nor anonymous object
  106. Which command of the following commands is used to compile “JavaTest” java file’s code?
    Topic: Java Basics & OOP
    1. java JavaTest
    2. javac JavaTest.java ✓ Correct answer
    3. javacJavaTest
    4. java JavaTest.java
  107. Which feature of the following features does Java provide?
    Topic: Java Basics & OOP
    1. Operator Overloading
    2. Pointers
    3. Function Overriding ✓ Correct answer
    4. Multiple Inheritance
  108. Which feature of the following features is not included in Java language?
    Topic: Java Basics & OOP
    1. Inheritance
    2. Polymorphism
    3. Pointer manipulation ✓ Correct answer
    4. Data encapsulation
  109. Which of the following belongs to a category of checked exception?
    Topic: Java Basics & OOP
    1. Null Pointer exception
    2. IOException ✓ Correct answer
    3. Array index out of bounds
    4. NumberFormatException
  110. Which of the following classes is capable to instantiate?
    Topic: Java Basics & OOP
    1. Abstract class
    2. Concrete class ✓ Correct answer
    3. Interface class
    4. None of the given
  111. Which of the following command is used to compile Java code?
    Topic: Java Basics & OOP
    1. java filename
    2. javac filename.java ✓ Correct answer
    3. javac filename
    4. java filename.java
  112. Which of the following exception belongs to a category of un-checked exception?
    Topic: Java Basics & OOP
    1. IOException
    2. Null Pointer exception ✓ Correct answer
    3. AWT Exception
    4. ClassNotFoundException
  113. Which of the following features is available in java?
    Topic: Java Basics & OOP
    1. Pointers
    2. Operator overloading
    3. Global variables
    4. Primitive data types ✓ Correct answer
  114. Which of the following features is not available in Java?
    Topic: Java Basics & OOP
    1. Data hiding
    2. Data encapsulation
    3. Single inheritance
    4. Multiple inheritance ✓ Correct answer
  115. Which of the following interface needs to implement while creating threads?
    Topic: Java Basics & OOP
    1. Serializable
    2. Runnable ✓ Correct answer
    3. ActionListener
    4. WindowListener
  116. Which of the following is NOT true for java inner classes?
    Topic: Java Basics & OOP
    1. Can have constructors
    2. Can have instance variables
    3. Can have Methods
    4. Generally used as public utility classes ✓ Correct answer
  117. Which of the following is a DDL statement?
    Topic: Java Basics & OOP
    1. Select
    2. Delete
    3. Create ✓ Correct answer
    4. Update
  118. Which of the following is a type of Java web application technologies?
    Topic: Java Basics & OOP
    1. JSTL
    2. JSF
    3. JSP
    4. All of the given ✓ Correct answer
  119. Which of the following is a valid variable name in Java?
    Topic: Java Basics & OOP
    1. 1xu
    2. Vu.506
    3. NumberOfStudent ✓ Correct answer
    4. Long
  120. Which of the following is called “pure abstract class”?
    Topic: Java Basics & OOP
    1. Concrete class
    2. Wrapper class
    3. Interface ✓ Correct answer
    4. Abstract class with no abstract method
  121. Which of the following is correct java code statement that is used to establish the connection?
    Topic: Java Basics & OOP
    1. Connection con = DriverManager.getConnection(conURL) ✓ Correct answer
    2. connection Con = driverManager.getConnection(conURL)
    3. connection Con = driverManager.getConnection(conURL)
    4. Connection con = driverManager.getConnection(conURL)
  122. Which of the following is not true about constructor?
    Topic: Java Basics & OOP
    1. Same name as class name
    2. Does not have any parameter(s) ✓ Correct answer
    3. No initialization list
    4. Does not have return type
  123. Which of the following is the correct syntax to make a PersonInfo class into a Serializable class?
    Topic: Java Basics & OOP
    1. Public class PersonInfo includes Serializabte { /* class body */}
    2. Public class PersonInfo imports Serializabte { /* class body */}
    3. Public class PersonInfo extends Serializabte { /* class body */}
    4. Public class PersonInfo implements Serializabte { /* class body */} ✓ Correct answer
  124. Which of the following is the correct way to access writeObject() function using “out” object of ObjectOutputStream class.
    Topic: Java Basics & OOP
    1. out->writeObject()
    2. out<-writeObject()
    3. out->(.writObject())
    4. out.writObject() ✓ Correct answer
  125. Which of the following is used for inheritance in java?
    Topic: Java Basics & OOP
    1. implements
    2. extends ✓ Correct answer
    3. : (colon)
    4. inherit
  126. Which of the following method allows any other thread of same priority to execute?
    Topic: Java Basics & OOP
    1. sleep()
    2. wait()
    3. notify()
    4. yield() ✓ Correct answer
  127. Which of the following method is used to convert a string into an int value?
    Topic: Java Basics & OOP
    1. intValue(}
    2. parselnt() ✓ Correct answer
    3. Parselnt()
    4. parselnteger()
  128. Which of the following method needs to override while handling threads in java?
    Topic: Java Basics & OOP
    1. init()
    2. start()
    3. run() ✓ Correct answer
    4. runnable()
  129. Which of the following name is used by the system to recognize the underlying data source?
    Topic: Java Basics & OOP
    1. DNS
    2. DSN ✓ Correct answer
    3. JDBC
    4. ODBC
  130. Which of the following operator is used to concatenate strings?
    Topic: Java Basics & OOP
    1. +=
    2. +-
    3. ++
    4. + ✓ Correct answer
  131. Which of the following problem occurs with lower priority threads?
    Topic: Java Basics & OOP
    1. Race condition
    2. Starvation ✓ Correct answer
    3. Average waiting time
    4. Process death
  132. Which of the following range of response code indicates that request was successful?
    Topic: Java Basics & OOP
    1. 100-199
    2. 200-299 ✓ Correct answer
    3. 300-399
    4. 400-499
  133. Which of the following statement regarding Java is false?
    Topic: Java Basics & OOP
    1. Java is a programming language
    2. A Java program compiles into machine language ✓ Correct answer
    3. Java is case sensitive language
    4. Java uses an interpreter
  134. Which of the following statements attaches an output stream to console?
    Topic: Java Basics & OOP
    1. FileWriter fw = new FileWriter(“output.txt”);
    2. FileWriter fw = new FileWriter(FileDescriptor.out); ✓ Correct answer
    3. FileWriter fw = new FileWriter(FileDescriptor.in);
    4. FileWriter fw = new FileWriter(FileDescriptor);
  135. Which of the following statements is true about primitive data types and reference data types?
    Topic: Java Basics & OOP
    1. Primitive data types are created on heap whereas references are created on stack
    2. Both primitive data type and references are created on stack
    3. Primitive data types are created on stack whereas references are created on heap ✓ Correct answer
    4. Both primitive data types and references are created on heap
  136. Which of the following statements is true regarding Vectors with no specified base type?
    Topic: Java Basics & OOP
    1. A base type is needed, because Java needs to know how to allocate memory
    2. No base type is needed, because Java will use the Object class as a base type ✓ Correct answer
    3. If a base type is not specified the code will not compile
    4. No base type is needed because Vectors default to storing String objects
  137. Which of the following stream is a Node stream?
    Topic: Java Basics & OOP
    1. PrintWriter
    2. FileWriter ✓ Correct answer
    3. BufferedReader
    4. All of given option
  138. Which of the following stream is a filter stream?
    Topic: Java Basics & OOP
    1. FileWriter
    2. FileReader `
    3. BufferedReader ✓ Correct answer
    4. All of given options
  139. Which of the following stream read/write data in the form of bytes?
    Topic: Java Basics & OOP
    1. FileReader
    2. FileWriter
    3. PrintWriter
    4. FileInputStream ✓ Correct answer
  140. Which of the following streams is a byte oriented stream?
    Topic: Java Basics & OOP
    1. FileReader
    2. PrintWriter
    3. BufferedReader
    4. FileInputStream ✓ Correct answer
  141. Which of the following syntax is used to attach an input stream to console?
    Topic: Java Basics & OOP
    1. FileReaderfr = new FileReader(' input.txt ') ;
    2. FileReaderfr = new FileReader(FileDescriptor.in); ✓ Correct answer
    3. FileReaderfr = new FileReader(FileDescriptor);
    4. FileReaderfr = new FileReader(console);
  142. Which of the following understands the byte code?
    Topic: Java Basics & OOP
    1. Operating system
    2. Java compiler
    3. Java Virtual Machine ✓ Correct answer
    4. Java Interpreter
  143. Which of these are valid declarations for the main method?
    Topic: Java Basics & OOP
    1. public void main();
    2. public static void main(String args[]); ✓ Correct answer
    3. static public void main(String);
    4. public static int main(String args|]);
  144. Which package contains ArrayList?
    Topic: Java Basics & OOP
    1. java.awt
    2. java.util ✓ Correct answer
    3. javax.swing
    4. java.lang
  145. Which statement from the following statements is true about a java Anonymous Inner Class
    Topic: Java Basics & OOP
    1. It is difficult to understand
    2. It has no name
    3. It is much shorter
    4. All of the given options ✓ Correct answer
  146. While running following ExceptionExample.java class on command line without passing command line arguments gives_ exception. public class ExceptionExample { public static void main (String args[]) { System.out.println(args[0]); }}
    Topic: Java Basics & OOP
    1. Null pointer exception
    2. Array index out of bound exception ✓ Correct answer
    3. Divide by zero exception
    4. IO Exception
  147. You want a class to have access to members of another class in the same package. Which is the most restrictive access that accomplishes this objective?
    Topic: Java Basics & OOP
    1. public
    2. private
    3. protected
    4. transient
    5. default access ✓ Correct answer
  148. _is/are not part of java core language.
    Topic: Java Basics & OOP
    1. ArrayList class ✓ Correct answer
    2. Variables
    3. Arrays
    4. Objects
  149. in a collection class creates a collection with no elements.
    Topic: Java Basics & OOP
    1. Constructors ✓ Correct answer
    2. Class
    3. Function
    4. Array
  150. int i = (int)( Math.random() * 5 ); // will generate random numbers between _____.
    Topic: Java Basics & OOP
    1. 0 ✓ Correct answer
    2. 0
    3. 1
    4. 1
  151. int x = 7/2; value of x is:
    Topic: Java Basics & OOP
    1. 1
    2. 2
    3. 3.5
    4. 3 ✓ Correct answer
  152. is required in order to get an object from collection.
    Topic: Java Basics & OOP
    1. Up-casting
    2. Down casting ✓ Correct answer
    3. Implicit casting
    4. None of the given options
  153. isReadOnly() is a method of _ object.
    Topic: Java Basics & OOP
    1. ResultSet
    2. ResultSetMetaData ✓ Correct answer
    3. DataBaseMetaData
    4. Connection
  154. previous() is a method of object
    Topic: Java Basics & OOP
    1. Statement
    2. ResultSet ✓ Correct answer
    3. ResultSetMetaData
    4. Connection
  155. returns the elements at specified position in the list.
    Topic: Java Basics & OOP
    1. Object get(int index) ✓ Correct answer
    2. Object set(int index)
    3. Object return(int index)
    4. Object remove(int index)
  156. Window frame and dialog use as their default layout.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Border layout ✓ Correct answer
    2. Flow layout
    3. GridBag layout
    4. Grid layout
  157. Event handling is step process.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. 1
    2. 2
    3. 3 ✓ Correct answer
    4. 4
  158. If a JPanel has a triangle drawn on it which of the following method will display it
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. PaintBorder()
    2. Paint()
    3. paintChildren()
    4. paintComponent() ✓ Correct answer
  159. Java defines for the listener interfaces having more than one event handling methods.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Wrapper Classes
    2. Abstract Classes
    3. Concrete Classes
    4. Adapter Classes ✓ Correct answer
  160. Which of the given Listener Interfaces is need to handle the “KeyEvent"?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. MouseKeyListener
    2. MotionKeyListener
    3. KeyListener ✓ Correct answer
    4. KeyActionListener
  161. Which of the following function will be used to register event handler with events generator, where event generator is button?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. AddAction()
    2. addActionListener() ✓ Correct answer
    3. addListener()
    4. registerListener
  162. Which of the following functions is declared in MouseMotionListener interface?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. public void mousePressed (MouseEvent me);
    2. public void mouseDragged(MouseEvent me); ✓ Correct answer
    3. public void mouseClicked (MouseEvent me);
    4. public void mouseEntered (MouseEvent me);
  163. AWT is a GUI package used in java, AWT stands for .
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Apache Windows Toolkit
    2. Application Windowing Tools
    3. Application Windows Template
    4. Abstract Windowing Toolkit ✓ Correct answer
  164. AWT is also called _.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Heavy weight components ✓ Correct answer
    2. Light weight components
    3. Both Light weight and heavy weight components
    4. Neither Light weight nor heavy weight
  165. Adapter classes have been defined for listener interfaces except interface.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. MouseListener
    2. KeyListener
    3. WindowlListener
    4. ActionListener ✓ Correct answer
  166. All AWT and swing components generate events.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. True ✓ Correct answer
    2. False
  167. An applet can be defined as:
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. A small program written in Java and included in an HTML page ✓ Correct answer
    2. A small program written in JSP and included in an HTML page
    3. A small program written in Servlet and included in an HTML page
    4. A small program written in JSF and included in an HTML . Choose the correct syntax to define an interface named as "Speaker" in java language
  168. An applet is a JFrame that allows interaction with a Java program.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. True
    2. False ✓ Correct answer
  169. An event in java is represented as
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Operator
    2. Function
    3. Object ✓ Correct answer
    4. Primitive data type
  170. Border Layout is the default layout manager for a JFrame’s content pane
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. True ✓ Correct answer
    2. False
  171. Border layout divides the area into regions
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. 3
    2. 4
    3. 5 ✓ Correct answer
    4. Pm 6
  172. Event source can have --------- listeners registered on it.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Single
    2. Double
    3. Triple
    4. Multiple ✓ Correct answer
  173. Following are the code statements used in java event handling. Identify the code statement that is used for registering event handler with event generator
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. b1 = new JButton("OK")
    2. b1.addActiobListener(this) ✓ Correct answer
    3. frame = new JFrame()
    4. frame.setSize(150,
  174. For a programmer the event handling is a three step process in terms of code. Which of the following is NOT an event handling step?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Generate event
    2. Handle event
    3. Publish event ✓ Correct answer
    4. Register handler with generator
  175. If a class needs to handle events generated by button then which of the following interface a classneeds to implement?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. ComponentListener
    2. KeyListener
    3. MouseListener
    4. Action Listener ✓ Correct answer
  176. If we want to animate something like ball, moving from one place to another. we constantly need to call paint () method.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. True
    2. False ✓ Correct answer
  177. If we want to handle mouse Clicked, released or pressed, Which of the following interface do we need to implement?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. MouseMoved
    2. MouseDragged
    3. MouseMotionListener
    4. MouseListener ✓ Correct answer
  178. In Java Graphics, while painting a swing component. which of the following functions is invoked first?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Paint()
    2. paintComponent() ✓ Correct answer
    3. paintBorder()
    4. PaintChildern()
  179. In Java, which of these classes implement the LayoutManager interface?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. RowLayout
    2. ColumnLayout
    3. GridBagLayout ✓ Correct answer
    4. Flow LayoutManager
  180. In an applet class definition, the method takes the place of the constructor.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. paint();
    2. main();
    3. init(); ✓ Correct answer
    4. run();
  181. In given lines of code is static variable and is static method. System.out.printin(“CS506”); JOptionPane.showMessageDialog(null,“CS506”)
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. System, JOptionPane
    2. PrintIn, showMessageDialog
    3. PrintIn, JOptionPane
    4. Out, showMessageDialog ✓ Correct answer
  182. In java, adapter classes have been defined for the following listener interfaces except interface
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. FocusListener
    2. ComponentListener
    3. MouseMotionListener
    4. ItemListener ✓ Correct answer
  183. In order to include graphics in your Java program, it is mandatory to extend from class.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. JLabel
    2. JFrame
    3. JPanel ✓ Correct answer
    4. JButton
  184. In the context of Java Graphics, paintChildren( ) method tells any component contained by this component to paint itself.(themselves).
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. True ✓ Correct answer
    2. False
  185. In the context of Java Graphics, which of the following methods we should override while painting?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. paint() ✓ Correct answer
    2. paintComponet( )
    3. paintBorder( )
    4. paintChildern( )
  186. In the context of Java Graphics; most of time, painting is done automatically.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. True ✓ Correct answer
    2. False
  187. JPanel and Applet use as their default layout.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Flow layout ✓ Correct answer
    2. Border layout
    3. Grid layout
    4. GridBag layout
  188. JVM put the events generated by event generator in a _______.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Stack
    2. Queue ✓ Correct answer
    3. List
    4. Hash table
  189. Java compiler is called on UNIX or windows.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Javac ✓ Correct answer
    2. java c
    3. cjava
    4. c java
  190. Mouse events can be trapped for GUI component.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. JPanel
    2. JFrame
    3. JButton
    4. Allofgiven ✓ Correct answer
  191. Mouse motion event is generated when mouse is:
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Pressed
    2. Entered
    3. Clicked
    4. Dragged ✓ Correct answer
  192. Painting is managed by the system, so calling paintComponent() directly is NOT recommended at all,
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. True ✓ Correct answer
    2. False
  193. Suppose we have to create a GUI with the following design: Stretches horizontally and has a fixed height; Stretches vertically and has a fixed Width; Takes up as much space as possible in all directions. What is the best single Layout to use?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Border Layout
    2. Grid Layout
    3. Flow Layout
    4. Box Layout ✓ Correct answer
  194. The class that handles mouse event needs to implement the corresponding interface and to provide the definition of:
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. One method in that interface
    2. Two methods in that interface
    3. All the methods in that interface ✓ Correct answer
    4. Do not need to provide definition of methods in that interface
  195. The code below draws a line. What color is the line? g.setColor(Color.red. green. yellow.red); g.drawLine(0, 0, 100,100);
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Red
    2. Green
    3. Yellow
    4. Black ✓ Correct answer
  196. The following code creates and starts a timer that fires an action event once per_ Timer t = new Timer (1000, this); t.start();
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Second ✓ Correct answer
    2. Minute
    3. Hour
    4. Day
  197. The “MouseDragged” and “mouseMoved" methods are defined in interface.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. MouseListener
    2. ltemListener
    3. MouseMotionListener ✓ Correct answer
    4. ActionListener
  198. Timers are constructed by specifying both a delay parameter and a/an Listener.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Action ✓ Correct answer
    2. Mouse
    3. Key
    4. Window
  199. What does the following code draw? g.setColor(Color.black); g.drawLine(10, 10, 10, 50); g.setColor(Color.RED); g.drawRect(100, 100, 150, 150);
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. A red vertical line that is 40 pixels long and a red square with sides of 150 pixels
    2. A black vertical line that is 40 pixels long and a red square with sides of 150 pixels ✓ Correct answer
    3. A black vertical line that is 50 pixels long and a red square with sides of 150 pixels
    4. A red vertical line that is 50 pixels long and a red square with sides of 150 pixels
  200. When you maximizes the applet which was minimized a few time before which of the following method will be called?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. start() ✓ Correct answer
    2. stop()
    3. init()
    4. destroy()
  201. Which of the following Statements is true regarding paintChildren() method?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. It tells the component to paint its border
    2. It first paints the background and then performs custom painting
    3. If first performs custom painting and then paints the background
    4. It tells any components contained by this component to paint themselves ✓ Correct answer
  202. Which of the following are passed as an argument to the paint ( ) method?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. A Canvas object
    2. A Graphics object ✓ Correct answer
    3. An Image object
    4. A paint object
  203. Which of the following classes provide definitions for all the methods (empty bodies) of their corresponding Listener interface?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. private classes
    2. public classes
    3. adapter classes ✓ Correct answer
    4. inner classes
  204. Which of the following command is used to invoke an Applet from command line interpreter?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Applet htmlfile
    2. appletviewer htmlfile ✓ Correct answer
    3. appletviewer javafile
    4. viewer htmlfile
  205. Which of the following is NOT true about paintComponent( ) method?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. It is a main method for painting
    2. By default, it first paints the background
    3. Tells the components border (if any) to paint ✓ Correct answer
    4. It performs custom painting (drawing circle, rectangles etc.)
  206. Which of the following is NOT true for an Applet?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. A small program written in Java and included in a HTML page
    2. It is independent of the operating system on which it runs
    3. They have no access to the client’s file system. ) and ✓ Correct answer
    4. An applet is a Panel that allows interaction with a Java program
  207. Which of the following is a correct registration method for Focus Listener interface?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. addFocusListener ✓ Correct answer
    2. addFocusedListener
    3. regFocusListener
    4. regFocusedListener
  208. Which of the following is a correct statement for “mouse click” event in “MouseListener’” interface?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. public void mouseclicked (MouseEvent me)
    2. public void MouseClicked (MouseEvent me)
    3. public void mouseClicked (MouseEvent me) ✓ Correct answer
    4. public void Mouseclicked (MouseEvent me)
  209. Which of the following is a general purpose container?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. JFrame
    2. Dialog
    3. JPanel ✓ Correct answer
    4. JApplet
  210. Which of the following is a top level container?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. JPanel
    2. ToolBar
    3. ScrollPane
    4. Dialog ✓ Correct answer
  211. Which of the following is true about AWT and SWING components?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. AWT components create a process whereas SWING component creates a thread ✓ Correct answer
    2. AWT components create a thread whereas SWING component creates a process
    3. Both AWT and SWING component creates a process
    4. Both AWT and SWING component creates a thread
  212. Which of the following method of Graphics object is used to draw rectangle?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. DrawRect(10,10,20,20);
    2. drawRect(10,10,20,20); ✓ Correct answer
    3. drawReactangle(10,10,20,20);
    4. DrawReactangle(10,10,20,20);
  213. Which of the following method of an Applet is called every time when page is minimized?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. start()
    2. init()
    3. stop() ✓ Correct answer
    4. destroy()
  214. Which of the following methods is called only once during the life cycle of an Applet?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. start( )
    2. paint()
    3. stop()
    4. destroy() ✓ Correct answer
  215. Which of the following methods takes the place of constructor in an Applet?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Run()
    2. Main()
    3. Init() ✓ Correct answer
    4. Start()
  216. Which of the following object is passed as an argument to paintComponent() method?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Image object
    2. Jpanel object
    3. JFrame object
    4. Graphic object ✓ Correct answer
  217. Which of the following statement is true regarding paintComponent() method?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. It tells any components contained by this component to paint themselves
    2. It tells the component to paint its border
    3. It first paints the background and then performs custom painting ✓ Correct answer
    4. It first performs custom painting and then paints the background
  218. Which of the following statements is a correct statement for “mouse release” event in “MouseListener” interface?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. public void mouseRelease(MouseEvent me)
    2. Public void mouseRelease(MouseEvent me
    3. public void mouseReleased(MouseEvent me) ✓ Correct answer
    4. Public void mouseReleased(MouseEvent me)
  219. Which of the given Listener Interface is need to handle the “ActionEvent'?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. MouseActionListener
    2. KeyAction Listener
    3. ActionListener ✓ Correct answer
    4. MotionListener
  220. Which of the given Listener Interfaces is needed to handle the “MouseEvent”?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. MouseListener ✓ Correct answer
    2. MouseMotionListener
    3. MouseActionListener
    4. MouseFocusListener
  221. Which of the given Listener interface(s) have adopter class(s)?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. ActionListener
    2. MouseMotionListener ✓ Correct answer
    3. AdjustmentListener
    4. ltemListener
  222. Which of the given methods is/are declared for“MouseListener” interface?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. MouseMoved
    2. MouseDragged
    3. MousePressed ✓ Correct answer
    4. MouseKeyPressed
  223. Which of the given will clear all the previous painting?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. super.paintComponent() ✓ Correct answer
    2. super paint()
    3. super. repaint()
    4. super.redraw()
  224. Which one of the following is not a method of MouseListener interface?
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Pressed
    2. Clicked
    3. Moved ✓ Correct answer
    4. Released
  225. Window Adaptor class implements Window Listener interface and provide the definition of all method inside..........
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. WindowListener interface ✓ Correct answer
    2. Inner Class
    3. Outer class
    4. Window adaptor class
  226. Window Listener interface contains methods.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Four
    2. Six
    3. Seven ✓ Correct answer
    4. Eight
  227. WindowListener interface contains methods.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Four
    2. Six
    3. Seven ✓ Correct answer
    4. Eight
  228. is correct syntax to create a general purpose container “myPanel” having flow layout.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. JPanel myPanel = new JPanel (FlowLayout()};
    2. JPanel myPanel = new JPanel (new FlowLayout};
    3. JPanel myPanel = new JPanel (new FlowLayout()}; ✓ Correct answer
    4. JPanel myPanel = JPanel (FlowLayout()};
  229. is correct syntax to get component area of“myFrame” top level container.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. Container c = myFrame.getComponentPane();
    2. Container c = myFrame.getContentArea();
    3. Container c = myFrame.getContentPane(); ✓ Correct answer
    4. Container c = myFrame->getComponentArea();
  230. setColor() is a method of _ object.
    Topic: GUI, AWT/Swing, Applets & Event Handling
    1. JPanel
    2. JFrame
    3. Graphics ✓ Correct answer
    4. Image
  231. Which of the following statement object is used to execute precompiled SQL statements?
    Topic: JDBC & Databases
    1. Statement
    2. PreparedStatement ✓ Correct answer
    3. CallableStatement
    4. None of give Option
  232. Which driver is the network type driver from the following?
    Topic: JDBC & Databases
    1. Type 1
    2. Type 2
    3. Type 3 ✓ Correct answer
    4. Type 4
  233. Which of the following is NOT a method of ResultSet object?
    Topic: JDBC & Databases
    1. next()
    2. absolute(int)
    3. executeQuery(sql) ✓ Correct answer
    4. updateRow()
  234. Which of the following method is used to execute INSERT, UPDATE and Delete SQL statements?
    Topic: JDBC & Databases
    1. ExecuteQuery(sql);
    2. ExecuteQuery(sql);
    3. Execute Update(sql); ✓ Correct answer
    4. Execute Update(sql);
  235. Which of the following statement is TRUE regarding default ResultSet?
    Topic: JDBC & Databases
    1. The default ResultSet is updatable and moves only forward.
    2. The default ResultSet is not updatable and moves only forward. ✓ Correct answer
    3. The default ResultSet is not updatable and moves forward as well as backward.
    4. The default ResultSet is updatable and moves forward as well as backward.
  236. Which of the following statement object is used to execute simple SQL statement?
    Topic: JDBC & Databases
    1. Statement ✓ Correct answer
    2. PreparedStatement
    3. CallableStatement
    4. None of given
  237. Which of the following statement object is used to execute stored procedures?
    Topic: JDBC & Databases
    1. Statement
    2. PreparedStatement
    3. CallableStatement ✓ Correct answer
    4. None of given options
  238. Which of the following syntax is used to get ResultSetMetaData object?
    Topic: JDBC & Databases
    1. ResultSetMetaData md = con.getMetaData(); // where con is Connection object
    2. ResultSetMetaData md = rs.getMetaData() // where rs is ResultSet object ✓ Correct answer
    3. ResultSetMetaData md = st.getMetaDataQ); // where st is Statement object
    4. ResultSet md = rs.getMetaData(); // where rs is ResultSetMetaDta object
  239. You must include a to declare an exception that might be thrown to another method.
    Topic: JDBC & Databases
    1. try block
    2. finally block
    3. catch block
    4. throws-clause ✓ Correct answer
  240. To create DataBaseMetaData object we write following line of code
    Topic: JDBC & Databases
    1. DatabaseMetaData db = con.getMeataData(); ✓ Correct answer
    2. ResultSetMetaDatarsmd = rs.getMetaData();
    3. ResultSetMetaDatarsmd = rs.setMetaDataQ);
    4. DataBaseMetaData db = con.setMeataData();
  241. A database that is created in MS Access 2003 will be saved with extension.
    Topic: JDBC & Databases
    1. java
    2. class
    3. doc
    4. mdb ✓ Correct answer
  242. A default ResultSet object has a cursor that .
    Topic: JDBC & Databases
    1. moves backward only
    2. moves forward only ✓ Correct answer
    3. moves backward and Forward
    4. cannot move
  243. A scrollable and updatable ResultSet object has the following capabilities except
    Topic: JDBC & Databases
    1. insert new rows
    2. insert new columns ✓ Correct answer
    3. delete rows
    4. update rows
  244. An applet is typically embedded in a Web page and can be run from a browser.
    Topic: JDBC & Databases
    1. True ✓ Correct answer
    2. False
  245. CREATE, ALTER, DROP are _ SQL statements.
    Topic: JDBC & Databases
    1. DML
    2. DDL ✓ Correct answer
    3. DCL
    4. None of given
  246. Consider the following code segment. String sql = SELECT * FROM Table ; PreparedStatement pstmt = con.prepareStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); Which of the following option is true?
    Topic: JDBC & Databases
    1. It creates Updatable/Scrollable ResultSet which moves forward only.
    2. It creates Updatable/Scrollable ResultSet which moves backward only
    3. It creates Updatable/Scrollable ResultSet which moves forward as well as backward. ✓ Correct answer
    4. It creates default ResultSet which moves forward as well as backward.
  247. DSN stands for
    Topic: JDBC & Databases
    1. Data System Name
    2. Domain system Name
    3. Data Source Name ✓ Correct answer
    4. Database System Name
  248. From which object do you ask for DatabaseMetaData?
    Topic: JDBC & Databases
    1. Connection ✓ Correct answer
    2. ResultSet
    3. DriverManager
    4. Driver
  249. If ResultSet is TYPE_FORWARD_ONLY then it when you call to the previous () method.
    Topic: JDBC & Databases
    1. Moves the cursor to previous row if cursor is on valid row
    2. Returns false if cursor is not on valid row
    3. Throws an exception ✓ Correct answer
    4. Executes normally
  250. If we have created a DSN named as employeeDSN what will be the url of database:
    Topic: JDBC & Databases
    1. "jdbc:odbc: employeeDSN" ✓ Correct answer
    2. "jdb_odbc: employeeDSN"
    3. "odbc :jdbc: employeeDSN"
    4. "jdbc:odbc_employeeDSN"
  251. In Java, types of statement objects are available for sending SQL queries to the databases.
    Topic: JDBC & Databases
    1. Two
    2. Three ✓ Correct answer
    3. Four
    4. Five
  252. In ResultSetMetaData methods, _ method returns the SQL type for the column to compare against types in java.sql Types
    Topic: JDBC & Databases
    1. getColumn Type (int) ✓ Correct answer
    2. getColumnCount()
    3. getColumnName(int)
    4. getColumnDisplay Size (int)
  253. In ResultSetMetaData methods, method returns the number of columns in the result set.
    Topic: JDBC & Databases
    1. getColumnCount ( ) ✓ Correct answer
    2. getColumnDisplaySize (int)
    3. getColumnLabel (int)
    4. getColumnType (int)
  254. In ResultSetMetaData methods, method returns the suggested column label for printouts.
    Topic: JDBC & Databases
    1. getColumnName()
    2. getColumnCount ()
    3. getColumnType (int)
    4. getColumnLabel() ✓ Correct answer
  255. JDBC-ODBC stands for _.
    Topic: JDBC & Databases
    1. Java DataBase Connectivity- Oracle DataBase Connectivity
    2. Java DataBase Corporation- Open DataBase Corporation
    3. Java DataBase Corporation- Oracle DataBase Corporation
    4. Java DataBase Connectivity- Open DataBase Connectivity ✓ Correct answer
  256. Let suppose a column has index 5 in the ResultSet object. Which of the following statement is used to retrieve the column values?
    Topic: JDBC & Databases
    1. String name = rs.getInt(4)
    2. String name = rs.getInt(5)
    3. String name = rs.getString(4)
    4. String name = rs.getString(5) ✓ Correct answer
  257. Result set index starts from :
    Topic: JDBC & Databases
    1. 0
    2. Any number
    3. -1
    4. 1 ✓ Correct answer
  258. ResultSet Meta Data will help you in answering the following questions except;
    Topic: JDBC & Databases
    1. How Many columns are in the ResultSet?
    2. What is the name of given column?
    3. How many rows are in the ResultSet? ✓ Correct answer
    4. Are the column name is case sensitive?
  259. ResultSet provides various getters to retrieve _.
    Topic: JDBC & Databases
    1. data of the column ✓ Correct answer
    2. data of the row
    3. data of the row and column
    4. column headers
  260. The method returns true or false depending upon whether the next row is available (exist) or not in ResultSet.
    Topic: JDBC & Databases
    1. getters
    2. next() ✓ Correct answer
    3. close()
    4. close()
  261. There are steps in order to communicate successfully with database.
    Topic: JDBC & Databases
    1. Six
    2. Seven
    3. Eight ✓ Correct answer
    4. Nine
  262. There is a program in which main method is calling method1 () and methodNew( ) is calling methodOld() . If the exception occurs in this program, Which of the following method will handle this exception? public static void methodOld() throws IOException{ //any code }
    Topic: JDBC & Databases
    1. MethodOld()
    2. methodNew() ✓ Correct answer
    3. main method()
    4. Run time system enviroment
  263. When defining a method you must include a to declare any exception that might be thrown but isnot caught in the method.
    Topic: JDBC & Databases
    1. try block
    2. finally block
    3. catch block
    4. throws-clause ✓ Correct answer
  264. Which database allows us to work having closed connection?
    Topic: JDBC & Databases
    1. Mysql
    2. PostgreSQL
    3. SQL
    4. SQLite ✓ Correct answer
  265. Which of following can be thrown using the throw statement?
    Topic: JDBC & Databases
    1. Error
    2. Throwable
    3. Exception ✓ Correct answer
    4. RuntimeException e. All of Given
  266. Which of the following code statement is used to define a connection URL?
    Topic: JDBC & Databases
    1. Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver)
    2. Connection abc = DriverManager.getConnection(conURL) ✓ Correct answer
    3. String asd = “jdbc:odbc:DSNname”
    4. Statement xyz = abc.createStatement()
  267. Which of the following driver type(s) has better performance than other?
    Topic: JDBC & Databases
    1. Type 1: JDBC - ODBC Bridge
    2. Type 2: Native - API/partly Java driver
    3. Type 3: Net - protocol/all-Java driver
    4. Type 4: Native - protocol/all-java driver ✓ Correct answer
  268. Which of the following exceptions can be caught in a throw clause?
    Topic: JDBC & Databases
    1. Null pointer exception
    2. Index out of bounds exception
    3. Division by zero exception
    4. IOException ✓ Correct answer
  269. Which of the following is not the method of ResultSetMetaData class.
    Topic: JDBC & Databases
    1. Previous() ✓ Correct answer
    2. isReadOnly()
    3. getColumnDisplay size()
    4. getColumnCount()
  270. Which of the following method is used to execute SELECT SQL statements?
    Topic: JDBC & Databases
    1. ExecuteUpdate(sql);
    2. ExecuteUpdate(sql);
    3. ExecuteQuery(sql); ✓ Correct answer
    4. Execute Query(sql);
  271. Which of the following method is used to move the cursor to given row number?
    Topic: JDBC & Databases
    1. absolute(int); ✓ Correct answer
    2. absolute();
    3. moveTolInsertRow(int);
    4. insertRow();
  272. Which of the following method is used to release the JDBC and database resources in ResultSet?
    Topic: JDBC & Databases
    1. next()
    2. getters
    3. previous()
    4. close() ✓ Correct answer
  273. Which of the following method/s is a ResultSetMetaData method?
    Topic: JDBC & Databases
    1. All of the given options ✓ Correct answer
    2. getColumnCount ()
    3. getColumnName(int)
    4. getColumnDisplaySize (int)
  274. Which of the following methods is used to determine whether a database is read only or not?
    Topic: JDBC & Databases
    1. isReadonty()
    2. isReadOnly() ✓ Correct answer
    3. isreadonly()
    4. IsReadOnly()
  275. Which of the following package needs to import while interacting with relational database?
    Topic: JDBC & Databases
    1. java.io
    2. java.sql ✓ Correct answer
    3. javax.swing
    4. java.awt
  276. Which of the following syntax is used to get DataBaseMetaData object?
    Topic: JDBC & Databases
    1. DataBaseMetaData md = rs.getMetaData(); // where rs is ResultSet object
    2. DataBaseMetaData md = st.getMetaData(); // where st is Statement object
    3. DataBaseMetaData md = con.getMetaData(); // where con is Connection object ✓ Correct answer
    4. DataBaseMetaData md = rsmd_.getMetaData(); // where rsmd is ResultSetMetaData object
  277. Which of the given statement objects are used to execute using same query multiple times by only changing parameters?
    Topic: JDBC & Databases
    1. Statement
    2. CallableStatement
    3. PreparedStatement ✓ Correct answer
    4. Both PreparedStatement and CallableStatement
  278. __________ translates all JDBC calls into ODBC calls and send them to the ODBC Driver.
    Topic: JDBC & Databases
    1. Type-1 ✓ Correct answer
    2. Type-2
    3. Type-3
    4. Type-4
  279. getColumnCount() is a method of object.
    Topic: JDBC & Databases
    1. Statement
    2. ResultSet
    3. ResultSetMetaData ✓ Correct answer
    4. DataBaseMetaData
  280. is the correct syntax to set size of top-level container “myFrame” as 200 rows in pixel and 400 columns in pixel.
    Topic: JDBC & Databases
    1. myFrame.setSize(200,400) ;
    2. myFrame.setSize(400,200) ; ✓ Correct answer
    3. myFrame->setSize(200,400) ;
    4. myFrame->setSize(400,200) ;
  281. Which of the following methods are invoked by the AWT to support paint and repaint operations?
    Topic: Networking, Sockets & Web Basics
    1. repaint() ✓ Correct answer
    2. paint( )
    3. draw()
    4. redraw()
  282. A port is a to which processes can listen for connections request.
    Topic: Networking, Sockets & Web Basics
    1. Local Address ✓ Correct answer
    2. Server Address
    3. Client Address
    4. Transport Address
  283. FTP (File Transmission Protocol) works on port.
    Topic: Networking, Sockets & Web Basics
    1. 21 ✓ Correct answer
    2. 23
    3. 80
    4. 84
  284. HTTP lies on which of the following layer?
    Topic: Networking, Sockets & Web Basics
    1. Presentation Layer
    2. Data Layer
    3. Network Layer
    4. Application Layer ✓ Correct answer
  285. HTTP works on port _.
    Topic: Networking, Sockets & Web Basics
    1. 21
    2. 23
    3. 80 ✓ Correct answer
    4. 84
  286. How many ports are available for TCP socket?
    Topic: Networking, Sockets & Web Basics
    1. 64
    2. 64k ✓ Correct answer
    3. 128
    4. 128k
  287. How many ports are available for UDP socket?
    Topic: Networking, Sockets & Web Basics
    1. 64
    2. 128
    3. 64k ✓ Correct answer
    4. 128k
  288. How many simultaneous connections can be opened using TCP and UDP ports?
    Topic: Networking, Sockets & Web Basics
    1. 6 4
    2. 1 2 8
    3. 64k
    4. 128k ✓ Correct answer
  289. In Java, we can read/write to a network using sockets.
    Topic: Networking, Sockets & Web Basics
    1. True ✓ Correct answer
    2. False
  290. In the context of Socket Programming, the client does NOT know about the hostname of the machine on which the server is running.
    Topic: Networking, Sockets & Web Basics
    1. True
    2. False ✓ Correct answer
  291. Port is a transport address to which processes can for connections request.
    Topic: Networking, Sockets & Web Basics
    1. Read
    2. Write
    3. Listen ✓ Correct answer
    4. None of the given options
  292. Socket is a -------------- communication channel between hosts.
    Topic: Networking, Sockets & Web Basics
    1. Uni-directional
    2. Bi-directional ✓ Correct answer
    3. Multi-directional
    4. None of these
  293. TELNET works on port.
    Topic: Networking, Sockets & Web Basics
    1. 21
    2. 23 ✓ Correct answer
    3. 80
    4. 84
  294. The server just waits, listening to the socket for a client to make a connection request.
    Topic: Networking, Sockets & Web Basics
    1. True ✓ Correct answer
    2. False
  295. Which of the following package needs to be import while handling files?
    Topic: Networking, Sockets & Web Basics
    1. java.util
    2. java.io ✓ Correct answer
    3. java.awt
    4. javax.swing
  296. Which of the following range of response code signify error by server?
    Topic: Networking, Sockets & Web Basics
    1. 200-299
    2. 300-399
    3. 400-499
    4. 500-599 ✓ Correct answer
  297. Which of the following syntax is used to create a Server Socket?
    Topic: Networking, Sockets & Web Basics
    1. ServerSocket ss = new ServerSocket(“serverName”);
    2. ServerSocket ss = new ServerSocket(serverPort); ✓ Correct answer
    3. ServerSocket ss = new ServerSocket(“serverName”, serverPort);
    4. ServerSocket ss = new ServerSocket(serverPort, “serverName”);
  298. Which of the following syntax is used to create a client socket?
    Topic: Networking, Sockets & Web Basics
    1. Socket s = new Socket(“serverName”);
    2. Socket s = new Socket(serverport);
    3. Socket s = new Socket(“serverName”, serverPort); ✓ Correct answer
    4. Socket s = new Socket(serverPort, “serverName”);
  299. You can --------- to a network using sockets.
    Topic: Networking, Sockets & Web Basics
    1. Read
    2. Write
    3. Read/Write ✓ Correct answer
    4. None of these
  300. getrequest() method gets information from a client and postrequest() method posts data to a client.
    Topic: Networking, Sockets & Web Basics
    1. True
    2. False ✓ Correct answer
  301. Choose the correct syntax to define an interface named as "Speaker" in java language
    Topic: Java Basics & OOP
    1. public class Speaker{}
    2. public interface class Speaker{}
    3. public interface Speaker{} ✓ Correct answer
    4. public Speaker class interface{}
  302. To compile all the .java files, the java compiler is called ______ on UNIX or Windows.
    Topic: Java Basics & OOP
    1. javac ✓ Correct answer
    2. cjava
    3. java.c
    4. c java
  303. Java programs are crafted in the Editor, whereas they are saved in ____________.
    Topic: Java Basics & OOP
    1. usb
    2. disk ✓ Correct answer
    3. primary memory
    4. external file
  304. In Java, static methods have direct access to _______.
    Topic: Java Basics & OOP
    1. Both static and instance members
    2. Instance variables
    3. Instance methods
    4. Static variables and methods ✓ Correct answer

MIHORA VU – Virtual University Assignment Solutions 2026, Solved Past Papers & All 455+ Courses

Official MIHORA TECH academic repository offering 28,328+ verified study documents for all 455+ Virtual University of Pakistan courses. Access VU Assignment Solution 2026 (Latest Session), Moaaz & Waqar Siddhu solved midterm & final papers, lecture handouts, and quizzes with 100% direct high-speed links.

SPRING 2026 / FALL 2026 ACTIVE SESSION

VU Assignment Solution 2026 (Latest Solved Assignments, GDBs & Quizzes)

Get high-scoring solutions for Assignment 1, Assignment 2, and Graded Discussion Boards across Computer Science, Mathematics, Management, English, and Economics. Compliant with Turnitin similarity limits (< 19%) and official 24-hour grace periods.

Open VU Assignment Solution 2026 Hub →

Popular Virtual University Courses (2026 Solved Papers & Solutions):

CS101 – Introduction to Computing CS201 – Introduction to Programming CS301 – Data Structures CS302 – Digital Logic Design CS401 – Computer Architecture & Assembly Language CS402 – Theory of Automata CS403 – Database Management Systems CS501 – Advance Computer Architecture CS502 – Fundamentals of Algorithms CS504 – Software Engineering - I CS506 – Enterprise Application Development CS601 – Data Communication CS602 – Computer Graphics CS604 – Operating Systems CS605 – Software Engineering - II CS607 – Artificial Intelligence CS610 – Computer Networks CS619 – Final Year Project MTH101 – Calculus & Analytical Geometry MTH202 – Discrete Mathematics MTH301 – Calculus II (Multivariable Calculus) MTH302 – Business Mathematics & Statistics MTH501 – Linear Algebra ENG101 – English Comprehension ENG201 – Business and Technical English Writing MGT101 – Financial Accounting MGT211 – Introduction to Business MGT301 – Principles of Marketing MGT501 – Human Resource Management ACC311 – Fundamentals of Auditing ACC501 – Business Finance STA301 – Statistics and Probability ECO401 – Economics (Micro & Macro) ISL202 – Islamic Studies / Ethics PAK301 – Pakistan Studies PHY101 – Physics - Mechanics & Waves

Complete Directory of All 455 Virtual University Courses & Codes

Browse the complete curriculum of all 455 accredited courses across 27 faculties of Virtual University of Pakistan. Every course includes verified lecture handouts, Moaaz & Waqar Siddhu solved papers, and 2026 assignment solution templates.

Accounting & Finance (16 Courses)

ACC301 – Financial Accounting ACC311 – Fundamentals of Auditing ACC501 – Business Finance BNK601 – Banking Laws & Practices BNK603 – Consumer Banking BNK604 – Commercial Banking BNK610 – Credit & Risk Management in Banking EFIN623 – Economics of Financial Markets FIN611 – Advanced Financial Accounting FIN621 – Financial Statement Analysis FIN622 – Corporate Finance FIN623 – Taxation Management FIN624 – Islamic Banking & Finance FIN625 – Credit & Risk Management FIN630 – Investment Analysis & Portfolio Management FIN722 – Advanced Corporate Finance

Bioinformatics (7 Courses)

BIF101 – Basic Bioinformatics BIF401 – Introduction to Bioinformatics BIF402 – Computational Biology Methods BIF501 – Genomics & Proteomics BIF601 – Bioinformatics Algorithms BIF602 – Structural Bioinformatics BIF604 – Systems Biology

Biological Sciences (16 Courses)

BIO101 – Basic Biology BIO102 – Introductory Biology & Diversity BIO201 – Cell Biology BIO202 – Biochemistry BIO203 – General Genetics BIO204 – Biochemical Techniques BIO301 – Molecular Biology BIO302 – Animal Physiology BIO303 – Developmental Biology BIO401 – Ecology & Evolutionary Biology BIO502 – Immunology & Pathology BIO503 – Pharmacology & Toxicology BIO504 – Applied Microbiology BIO505 – Environmental Biotechnology BIO506 – Forensic Biology BIO731 – Advanced Molecular Genetics

Virtual University of Pakistan (43 Courses)

BNK611 – Economic Ideology in Islam BT613T – Agricultural Biotechnology CS306 – Introduction to Python CS441 – Big Data Concepts CS442 – Introduction to Data Science CS620 – Modeling & Simulation CS701 – Theory of Computation CS703 – Operating Systems CS704 – Advanced Computer Architecture ECO302 – Microeconomics EDU407 – EDU407 ENG401 – Introduction to Literature: Short Story and Poetry GSC201 – Teaching of General Science MCM516 – TV News Reporting and Production MGMT611 – Human Relations MGMT629 – Crisis Management MGT201 – Financial Management MGT401 – Financial Accounting II MGT404 – MGT404 MGT504 – Organization Theory & Design MGT520 – International Business MGT522 – MGT522 MGT601 – SME Management MGT603 – Strategic Management MGT613 – Production and Operations Management MGT703 – Strategic Management MGT705 – Advanced Cost and Management Accounting MGT713 – Production / Operations Management MTH102 – Basic Algebra and Trigonometry MTH201 – Multivariable Calculus MTH304 – Mechanics MTH403 – MTH403 MTH404 – MTH404 MTH405 – MTH405 MTH621 – Real Analysis I MTH633 – Group Theory MTH642 – Fluid Mechanics MTH643 – MTH643 PAK303 – PAK303 PSC401 – Public International Law PSY409 – Positive Psychology SE601 – Software Construction & Development SE602 – Software Re—engineering

Bio-Technology (34 Courses)

BT101 – Ecology, Biodiversity & Evolution BT102 – Microbiology BT201 – Biotechnology Fundamentals BT301 – Recombinant DNA Technology BT302 – Cell and Tissue Culture BT401 – Genetic Engineering BT402 – Fermentation Technology BT403 – Agricultural Biotechnology BT404 – Medical Biotechnology BT405 – Industrial Biotechnology BT406 – Nanobiotechnology BT501 – Biochemical Engineering BT502 – Biosafety & Bioethics BT503 – Molecular Diagnostics BT504 – Stem Cell Technology BT505 – Food Biotechnology BT511 – Vaccine Technology BT512 – Drug Design & Development BT513 – Genomics & Functional Proteomics BT514 – Enzyme Technology BT601 – Advanced Genetic Engineering BT602 – Bioinformatics in Biotechnology BT603 – Bioprocess Engineering BT604 – Aquatic Biotechnology BT605 – Environmental Bioremediation BT611 – Synthetic Biology BT612 – Metabolic Engineering BT613 – Biofuels and Bioenergy BT614 – Clinical Research in Biotechnology BT693 – Research Project in Biotechnology BT732 – Advanced Molecular Biology Seminar BT734 – Advanced Cellular Biotechnology BT735 – Current Topics in Biotechnology NTBT301 – Nanotechnology in Biotechnology

Chemistry (2 Courses)

CHE201 – General Chemistry CHE301 – Organic Chemistry

Computer Science (55 Courses)

CS000 – Introduction to Computer Fundamentals CS001 – Computer Proficiency License CS101 – Introduction to Computing CS201 – Introduction to Programming CS202 – Web Design & Development CS204 – Cyber Law & Intellectual Property CS205 – Information Security Management CS206 – Ethical Hacking & Defense CS301 – Data Structures CS302 – Digital Logic Design CS304 – Object Oriented Programming CS310 – Introduction to Programming (Python) CS311 – Introduction to Web Services Development CS312 – Mobile Application Development CS314 – Embedded Systems & IoT CS315 – Web Engineering CS401 – Computer Architecture & Assembly Language CS402 – Theory of Automata CS403 – Database Management Systems CS405 – Mobile Computing CS407 – Cloud Computing Fundamentals CS408 – Human Computer Interaction CS409 – Ethical & Legal Issues in Computing CS410 – Design & Analysis of Algorithms CS411 – Visual Programming CS420 – Game Design and Development CS432 – Network Security CS435 – Cloud Computing Infrastructure CS501 – Advance Computer Architecture CS502 – Fundamentals of Algorithms CS505 – Agile Software Development CS506 – Enterprise Application Development CS507 – Information Systems CS508 – Modern Programming Languages CS510 – Compiler Construction CS511 – Distributed Systems CS521 – Data Science Principles CS601 – Data Communication CS602 – Computer Graphics CS603 – Software Architecture CS604 – Operating Systems CS606 – Compiler Design & Construction CS607 – Artificial Intelligence CS608 – Digital Signal Processing CS609 – System Programming CS610 – Computer Networks CS614 – Data Warehousing CS619 – Final Year Project CS621 – Information Retrieval Techniques CS625 – Formal Methods in Software Engineering CS627 – Computer Vision & Pattern Recognition CS636 – Big Data Analytics CS708 – Advanced Computer Graphics CS713 – Advanced Software Architecture CS718 – Advanced Artificial Intelligence

Software Engineering (4 Courses)

CS504 – Software Engineering - I CS605 – Software Engineering - II CS611 – Software Quality Assurance CS615 – Software Project Management

Statistics (18 Courses)

DSTA630 – Data Science Research Methods STA000 – Basic Statistics Fundamentals STA100 – Foundations of Statistics STA301 – Statistics and Probability STA304 – Statistical Inference STA404 – Experimental Design STA406 – Sampling Techniques STA408 – Biostatistics and Epidemiology STA630 – Research Methods in Social Sciences STA631 – Advanced Statistical Methods STA632 – Multivariate Analysis STA641 – Non-Parametric Methods STA642 – Econometric Models STA730 – Advanced Research Methodology in Statistics STAT100 – Statistics Fundamentals STAT404 – Applied Statistical Modeling STAT408 – Statistical Computing STAT730 – Advanced Biostatistics

Education (44 Courses)

ECE101 – Introduction to Early Childhood Care & Education EDU101 – Foundations of Education EDU201 – Learning Theories & Applications EDU205 – Classroom Management EDU301 – General Methods of Teaching EDU302 – Human Development & Learning EDU303 – School, Community and Teacher EDU304 – Educational Assessment & Evaluation EDU305 – Curriculum Development & Instruction EDU306 – Contemporary Trends in Education EDU401 – Critical Thinking and Reflective Practices EDU402 – Educational Leadership & Management EDU403 – Art, Craft & Calligraphy in Education EDU404 – Teaching of English EDU405 – Teaching of Mathematics EDU406 – Teaching of General Science EDU410 – ICT in Education EDU411 – Teaching of Social Studies EDU430 – Information & Communication Technology in Teaching EDU431 – Test Development & Measurement EDU433 – Educational Statistics EDU501 – Educational Psychology EDU505 – Guidance and Counseling in Schools EDU510 – Qualitative Research in Education EDU512 – Comparative Education EDU514 – Special Education Principles EDU515 – Early Childhood Education Curriculum EDU516 – Educational Technology & Media EDU601 – Philosophy of Education EDU602 – Educational Planning and Policy EDU604 – Educational Administration & Supervision EDU630 – Research Methods in Education EDU654 – Teacher Education in Pakistan EDU702 – Advanced Seminar in Educational Leadership EDU705 – Advanced Educational Policy Analysis EDUA305 – Applied Curriculum Development EDUA403 – Elementary Arts Education EDUA405 – Pedagogy of Mathematics EDUA516 – Educational Media Design EDUA630 – Action Research in Educational Settings MEDU402 – Master Level Educational Leadership MEDU406 – Science Teaching Pedagogies MEDU430 – Advanced ICT in Education MEDU601 – Advanced Philosophy of Education

Economics (11 Courses)

ECO401 – Economics (Micro & Macro) ECO402 – Microeconomics Analysis ECO403 – Macroeconomics Analysis ECO404 – Managerial Economics ECO406 – Development Economics ECO501 – Monetary Economics ECO601 – International Economics ECO603 – Public Sector Economics ECO606 – Agricultural Economics ECO607 – Environmental & Resource Economics ECO610 – Econometrics Principles

Management Sciences (26 Courses)

EMG525 – Engineering Project Management MGMT614 – Leadership & Team Building MGMT615 – Project Management Practices MGMT617 – Project Management Methodologies MGMT622 – Operations Management MGMT623 – Supply Chain Management MGMT625 – Knowledge Management Systems MGMT627 – Global Business Strategy MGMT628 – Strategic Management MGMT630 – Business Strategy & Policy MGMT631 – Innovation Management MGT101 – Financial Accounting MGT111 – Introduction to Public Administration MGT211 – Introduction to Business MGT301 – Principles of Marketing MGT402 – Cost & Management Accounting MGT411 – Money & Banking MGT501 – Human Resource Management MGT502 – Organizational Behaviour MGT503 – Principles of Management MGT510 – Total Quality Management MGT602 – Entrepreneurship MGT604 – Management of Financial Institutions MGT610 – Business Ethics & Corporate Governance MGT611 – Business & Labor Law MGTE630 – Business Management Strategy

English (34 Courses)

ENG001 – Basic English Grammar & Composition ENG101 – English Comprehension ENG201 – Business and Technical English Writing ENG301 – Business Communication ENG501 – History of English Language ENG502 – Introduction to Linguistics ENG503 – English Morphology and Syntax ENG504 – Sociolinguistics ENG505 – Phonetics & Phonology ENG506 – World Englishes ENG507 – Psycholinguistics ENG508 – Semantics & Pragmatics ENG509 – English for Specific Purposes (ESP) ENG510 – Language Testing & Evaluation ENG511 – Syllabus Design & Materials Development ENG512 – Stylistics & Literary Analysis ENG513 – Second Language Acquisition (SLA) ENG514 – Classical Poetry ENG515 – Classical Drama ENG516 – Research Methodology in Linguistics ENG517 – Modern Poetry ENG518 – Modern Drama ENG519 – Classical Novel ENG520 – Modern Novel ENG521 – American Literature ENG522 – Postcolonial Literature ENG523 – Continental Literature & Criticism ENG524 – Literary Criticism & Theory ENG525 – Discourse Analysis ENG526 – Applied Linguistics in Education ENG527 – Creative Writing & Composition ENG528 – Corpus Linguistics ENG529 – Translation Studies & Theory FENG301 – Functional English for Professionals

Islamic Studies (4 Courses)

ETH100 – Ethics (For Non-Muslim Students) ETH201 – Ethics & Moral Philosophy (For Non-Muslims) ISL201 – Islamic Studies ISL202 – Islamic Studies / Ethics

General Guides (1 Courses)

GENERAL – General University Resources, Guides & Handbooks

General Sciences (1 Courses)

GSC101 – General Science

Human Resources (4 Courses)

HRM613 – Human Resource Development HRM617 – Compensation & Benefits Management HRM624 – Conflict & Negotiation Management HRM627 – Strategic Human Resource Management

Information Technology (4 Courses)

IT430 – E-Commerce & Digital Business IT601 – Network Administration IT602 – Database Administration ITU430 – E-Commerce Systems

Microbiology (4 Courses)

MB501 – General Microbiology & Microbial Diversity MB502 – Microbial Physiology & Metabolism MB504 – Medical Microbiology MIC501 – Applied Microbiology

Mass Communication (22 Courses)

MCD401 – Media Content Development MCD403 – Media Ethics & Professional Standards MCM000 – Introduction to Communication Fundamentals MCM101 – Introduction to Mass Communication MCM301 – Communication Skills MCM304 – Mass Media in Pakistan MCM310 – Radio Broadcasting & Audio Media MCM311 – Radio & Television Production MCM401 – Fundamentals of Public Relations MCM404 – Electronic Media Content Creation MCM411 – News Writing and Reporting MCM431 – Digital Media & Online Journalism MCM501 – Development Support Communication MCM511 – Media Ethics, Cyber Laws & Regulation MCM514 – Feature, Column & Editorial Writing MCM517 – Advertising Strategy & Campaigns MCM520 – Print Media Design & Layout MCM531 – International & Cross-Cultural Communication MCM601 – Theories of Mass Communication MCM604 – Communication Research Methodology MCM610 – Cyber Journalism & Web Publishing MCMP310 – Radio & Audio Production Practical

Marketing (5 Courses)

MKT501 – Marketing Management MKT530 – Consumer Behaviour MKT610 – Customer Relationship Management (CRM) MKT621 – Advertising & Brand Management MKT630 – International Marketing Strategy

Mathematics (20 Courses)

MTH001 – Elementary Mathematics MTH100 – General Mathematics MTH101 – Calculus & Analytical Geometry MTH104 – Sets & Logic MTH202 – Discrete Mathematics MTH301 – Calculus II (Multivariable Calculus) MTH302 – Business Mathematics & Statistics MTH401 – Differential Equations MTH501 – Linear Algebra MTH601 – Operations Research MTH603 – Numerical Analysis MTH622 – Vector & Tensor Analysis MTH631 – Real Analysis MTH632 – Complex Analysis MTH634 – Topology MTH641 – Functional Analysis MTH644 – Mathematical Methods MTH645 – Mechanics MTH646 – Differential Geometry MTH647 – Fluid Mechanics

Social Studies (3 Courses)

PAK301 – Pakistan Studies PAK302 – History of Pakistan PAK522 – Ideology & Constitution of Pakistan

Physics (3 Courses)

PHY000 – Foundational Physics PHY101 – Physics - Mechanics & Waves PHY301 – Circuit Theory

Psychology (23 Courses)

PSY101 – General Psychology PSY401 – Clinical Psychology Fundamentals PSY402 – Social Psychology PSY403 – Developmental Psychology PSY404 – Abnormal Psychology PSY405 – Personality Theories & Assessment PSY406 – Educational Psychology Applications PSY407 – Experimental Psychology & Lab Methods PSY408 – Health Psychology PSY502 – History and Systems of Psychology PSY504 – Cognitive Psychology PSY505 – Psychological Testing & Measurement PSY510 – Positive Psychology & Well-being PSY511 – Counseling Psychology Principles PSY512 – Organizational & Industrial Psychology PSY513 – Neuropsychology Fundamentals PSY515 – Forensic & Criminal Psychology PSY516 – Cross-Cultural Psychology PSY610 – Neurological Basis of Behavior PSY611 – Psychopathology & Diagnostics PSY631 – Psychological Assessment Practicum PSY632 – Research Methods in Psychology PSYP631 – Psychological Assessment Lab Practical

Sociology (14 Courses)

SOC101 – Introduction to Sociology SOC201 – Pakistani Society and Culture SOC301 – Social Psychology & Society SOC302 – Cultural Anthropology SOC401 – Social Research Methods SOC402 – Classical Sociological Theories SOC403 – Social Change & Modernization SOC404 – Urban Sociology SOC601 – Rural Sociology & Community Development SOC602 – Gender Studies & Society SOC605 – Criminology & Juvenile Delinquency SOC608 – Sociology of Development SOC609 – Sociology of Health & Medicine SOC610 – Demography & Population Dynamics

Urdu Literature (2 Courses)

URD101 – Functional Urdu (Urdu Zaban-o-Adab) URDU101 – Urdu Language & Literature

Zoology (35 Courses)

ZOO101 – Principles of Animal Life I ZOO102 – Principles of Animal Life II ZOO103 – Animal Diversity: Invertebrates ZOO111 – Fundamentals of Zoology ZOO201 – Animal Diversity: Chordates ZOO202 – Animal Form & Function I ZOO203 – Animal Form & Function II ZOO301 – Animal Physiology ZOO302 – Cell & Molecular Biology in Zoology ZOO307 – Principles of Ecology ZOO401 – Evolution & Principles of Systematics ZOO403 – Animal Behavior & Sociobiology ZOO404 – Biostatistics for Zoologists ZOO405 – General Developmental Biology ZOO501 – Developmental Biology ZOO502 – Environmental Biology ZOO503 – Biostatistics in Zoological Research ZOO504 – Zoogeography & Paleontology ZOO505 – Wildlife of Pakistan & Conservation ZOO506 – Endocrinology ZOO507 – Animal Diversity & Behavior ZOO509 – Fish Biology & Fisheries Science ZOO510 – General Microbiology & Immunology ZOO511 – Immunology & Serology ZOO512 – Parasitology & Vectors ZOO513 – Applied Entomology ZOO514 – Biochemistry of Animals ZOO515 – Genetics & Population Biology ZOO516 – Aquaculture & Fisheries Management ZOO517 – Toxicology & Environmental Health ZOO518 – Comparative Vertebrate Anatomy ZOO519 – Mammalogy ZOO520 – Ornithology (Bird Biology) ZOO603 – Applied Parasitology & Vector Biology ZOO630 – Research Methodology in Zoology

Core Student Calculators & Rules Handbooks

Frequently Asked Questions – MIHORA VU Study Library

Where can I download VU Assignment Solution 2026 for CS101, CS201, MTH101, and all subjects?

MIHORA VU (https://study.mihora.tech/vu-assignment-solution-2026) offers verified 2026 assignment solutions, GDB answers, quiz files, and Dev-C++ code templates for all 455 Virtual University courses with 100% free direct downloads.

What is the 24-hour assignment grace period in Virtual University?

Virtual University gives students an automatic 24-hour grace period after the official assignment deadline. Submissions during this grace window are awarded full credit with 0 marks deduction.

How to avoid zero marks in VU assignments due to Turnitin plagiarism?

Never copy-paste solutions directly from YouTube or public groups. Keep Turnitin similarity under 19% by renaming code variables, rearranging logical statements, and writing custom explanations.

Where can I get Moaaz and Waqar Siddhu solved midterm and final past papers?

MIHORA VU hosts over 28,328 verified documents including complete Moaaz and Waqar Siddhu past paper collections for all 455 VU subjects, available via direct download without registration.

What is the 20% Two-Half passing rule in Virtual University?

Students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterms) AND independently at least 20% in the Final Term exam paper to pass any course.