Computer Science Fundamentals

Test your knowledge of core computer science topics including Java programming, networking (OSI model), database management systems, and computer security concepts.

24 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is the role of getClass() method of the Object class in Java?

  1. This method is a final method that returns a runtime representation of the class of this object.
  2. This method returns a String representation of the object.
  3. This method compares two objects for equality.
  4. This method creates a clone of this object.
  5. None of the above
Question 2 Multiple Choice (Single Answer)

Which of the following is/are true about the data link layer in networking?

  1. It provides services to the network layer.
  2. It deals with transmission errors.
  3. It controls the operation of subnet in networking.
  4. All of the above.
  5. Only (1) and (2)
Question 3 Multiple Choice (Single Answer)

Which of the following layer of the OSI model is responsible for congestion control in networking?

  1. Transport layer
  2. Presentation layer
  3. Application layer
  4. Network layer
  5. Physical layer
Question 4 Multiple Choice (Single Answer)

Which of the following methods are defined by SortedSet interface in java collection framework?

  1. Object first()
  2. Object last()
  3. Comparator comparator()
  4. All of the above
  5. Only (1) and (3)
Question 5 Multiple Choice (Single Answer)

Which of the following is/are true about network layer of the OSI model in networking?

  1. It provides services to the transport layer.
  2. It uses store and forward packet switching technique in the networking medium to delivery the information.
  3. Network layer is responsible in the implementation of connection oriented and connectionless services.
  4. All of the above.
  5. Only (1) and (2)
Question 6 Multiple Choice (Single Answer)

Which of the following layers in the OSI model is responsible for authorization and authentication services for the end user application in networking?

  1. Presentation layer
  2. Network layer
  3. Session layer
  4. Physical layer
  5. Data link layer
Question 7 Multiple Choice (Single Answer)

Which of the following methods of the ListIterator interface gives NoSuchElementException?

  1. boolean hasNext()
  2. boolean hasPrevious()
  3. Object previous()
  4. Object next()
  5. None of the above
Question 8 Multiple Choice (Single Answer)

Which of the following methods of the Map.Entry interface throws ClassCastException?

  1. Object getKey()
  2. Object getValue()
  3. int hashCode()
  4. Object setValue(Object v)
  5. None of the above
Question 9 Multiple Choice (Single Answer)

Which of the following classes is extended by the HashMap class in java collection framework?

  1. Map
  2. AbstractMap
  3. SortedMap
  4. TreeMap
  5. None of the above
Question 10 Multiple Choice (Single Answer)

Which of the following is not a constructor of the HashMap class in java collection framework?

  1. HashMap()
  2. HashMap(Map m)
  3. HashMap(int capacity)
  4. HashMap(int capacity, float fillRatio)
  5. None of the above
Question 11 Multiple Choice (Single Answer)

Which of the following exceptions might the method int compare(Object obj1, Object obj2) throw in java collection framework?

  1. ClassCastException
  2. IllegalArguementException
  3. InvalidArguementException
  4. Both (1) and (2)
  5. None of the above
Question 12 Multiple Choice (Single Answer)

What does the Object peek() method of Stack class in java collection framework do?

  1. It returns the element on the top of the stack and remove it.
  2. It is used to push the element on the stack.
  3. It returns true if the stack is empty, otherwise returns false.
  4. There is no such method defined in Stack class.
  5. None of the above
Question 13 Multiple Choice (Single Answer)

What does String nextToken() method of the StringTokenizer class in java do?

  1. It returns the next token as a String and sets the delimiter string.
  2. It returns the next token as a String.
  3. It returns the next token as an Object.
  4. Both (1) and (2)
  5. None of the above
Question 14 Multiple Choice (Single Answer)

Which of the following classes in java collection framework maintains the list of values such that the key and value both are Strings?

  1. Dictionary
  2. Properties
  3. Hashtable
  4. HashMap
  5. None of the above
Question 15 Multiple Choice (Single Answer)

Which of the following is/are the true statement(s) in java collection framework?

  1. Dictionary class is an abstract class.
  2. Dictionary class is an implementation of the Hashtable class.
  3. Dictionary class stores or retrieves the element in the form of key/value pair like Map class.
  4. All of the above.
  5. Only (1) and (3) are true
Question 16 Multiple Choice (Single Answer)

Which of the following statement(s) is/are true?

  1. Secret key encryption is called asymmetric key encryption.
  2. DES(Data Encryption Standard )is based on symmetric key encryption.
  3. Secret key encryption ensures confidentiality of the message.
  4. Secret key encryption does not authenticate identity of the source.
  5. All of the above.
Question 17 Multiple Choice (Single Answer)

Which of the following is not an object oriented programming language?

  1. Java
  2. C++
  3. Perl
  4. Simula
  5. None of the above
Question 18 Multiple Choice (Single Answer)

Which of the following keywords is not used in java?

  1. const
  2. native
  3. import
  4. case
  5. break
Question 19 Multiple Choice (Single Answer)

Which of the following interface(s) is/are defined by the java.util package?

  1. Collection
  2. RandomAccess
  3. Comparator
  4. Enumeration
  5. All of the above
Question 20 Multiple Choice (Single Answer)

Which of the following is not an Integrated Development Environment(IDE)?

  1. Netbeans
  2. Eclipse
  3. Visual Studio
  4. Jcreater
  5. None of the above
Question 21 Multiple Choice (Single Answer)

Which of the following is not a database server?

  1. MySql Server
  2. Sql Server
  3. Weblogic server
  4. Postgre SQL server
  5. Oracle server
Question 22 Multiple Choice (Single Answer)

Which of the following statements is/are true?

  1. RDBMS (Relational Database Management System) stores the data in tabular form.
  2. DBMS (Database Management System) does not follow normalization.
  3. RDBMS does not support client server architecture.
  4. All of the above.
  5. Only (1) and (2) are true
Question 23 Multiple Choice (Single Answer)

Which of the following statement(s) is/are false?

  1. A trigger is executed automatically.
  2. Stores procedure can be invoked explicitly.
  3. A trigger can not return any value.
  4. A stored procedure can not return any value.
  5. None of the above
Question 24 Multiple Choice (Single Answer)

Which of the following commands is an example of DDL (Data Definition Language) in database?

  1. Rename
  2. Delete
  3. Grant
  4. Revoke
  5. None of the above