Computer Science Fundamentals
Test your knowledge of core computer science topics including Java programming, networking (OSI model), database management systems, and computer security concepts.
Questions
What is the role of getClass() method of the Object class in Java?
- This method is a final method that returns a runtime representation of the class of this object.
- This method returns a String representation of the object.
- This method compares two objects for equality.
- This method creates a clone of this object.
- None of the above
Which of the following is/are true about the data link layer in networking?
- It provides services to the network layer.
- It deals with transmission errors.
- It controls the operation of subnet in networking.
- All of the above.
- Only (1) and (2)
Which of the following layer of the OSI model is responsible for congestion control in networking?
- Transport layer
- Presentation layer
- Application layer
- Network layer
- Physical layer
Which of the following methods are defined by SortedSet interface in java collection framework?
- Object first()
- Object last()
- Comparator comparator()
- All of the above
- Only (1) and (3)
Which of the following is/are true about network layer of the OSI model in networking?
- It provides services to the transport layer.
- It uses store and forward packet switching technique in the networking medium to delivery the information.
- Network layer is responsible in the implementation of connection oriented and connectionless services.
- All of the above.
- Only (1) and (2)
Which of the following layers in the OSI model is responsible for authorization and authentication services for the end user application in networking?
- Presentation layer
- Network layer
- Session layer
- Physical layer
- Data link layer
Which of the following methods of the ListIterator interface gives NoSuchElementException?
- boolean hasNext()
- boolean hasPrevious()
- Object previous()
- Object next()
- None of the above
Which of the following methods of the Map.Entry interface throws ClassCastException?
- Object getKey()
- Object getValue()
- int hashCode()
- Object setValue(Object v)
- None of the above
Which of the following classes is extended by the HashMap class in java collection framework?
- Map
- AbstractMap
- SortedMap
- TreeMap
- None of the above
Which of the following is not a constructor of the HashMap class in java collection framework?
- HashMap()
- HashMap(Map m)
- HashMap(int capacity)
- HashMap(int capacity, float fillRatio)
- None of the above
Which of the following exceptions might the method int compare(Object obj1, Object obj2) throw in java collection framework?
- ClassCastException
- IllegalArguementException
- InvalidArguementException
- Both (1) and (2)
- None of the above
What does the Object peek() method of Stack class in java collection framework do?
- It returns the element on the top of the stack and remove it.
- It is used to push the element on the stack.
- It returns true if the stack is empty, otherwise returns false.
- There is no such method defined in Stack class.
- None of the above
What does String nextToken() method of the StringTokenizer class in java do?
- It returns the next token as a String and sets the delimiter string.
- It returns the next token as a String.
- It returns the next token as an Object.
- Both (1) and (2)
- None of the above
Which of the following classes in java collection framework maintains the list of values such that the key and value both are Strings?
- Dictionary
- Properties
- Hashtable
- HashMap
- None of the above
Which of the following is/are the true statement(s) in java collection framework?
- Dictionary class is an abstract class.
- Dictionary class is an implementation of the Hashtable class.
- Dictionary class stores or retrieves the element in the form of key/value pair like Map class.
- All of the above.
- Only (1) and (3) are true
Which of the following statement(s) is/are true?
- Secret key encryption is called asymmetric key encryption.
- DES(Data Encryption Standard )is based on symmetric key encryption.
- Secret key encryption ensures confidentiality of the message.
- Secret key encryption does not authenticate identity of the source.
- All of the above.
Which of the following is not an object oriented programming language?
- Java
- C++
- Perl
- Simula
- None of the above
Which of the following keywords is not used in java?
- const
- native
- import
- case
- break
Which of the following interface(s) is/are defined by the java.util package?
- Collection
- RandomAccess
- Comparator
- Enumeration
- All of the above
Which of the following is not an Integrated Development Environment(IDE)?
- Netbeans
- Eclipse
- Visual Studio
- Jcreater
- None of the above
Which of the following is not a database server?
- MySql Server
- Sql Server
- Weblogic server
- Postgre SQL server
- Oracle server
Which of the following statements is/are true?
- RDBMS (Relational Database Management System) stores the data in tabular form.
- DBMS (Database Management System) does not follow normalization.
- RDBMS does not support client server architecture.
- All of the above.
- Only (1) and (2) are true
Which of the following statement(s) is/are false?
- A trigger is executed automatically.
- Stores procedure can be invoked explicitly.
- A trigger can not return any value.
- A stored procedure can not return any value.
- None of the above
Which of the following commands is an example of DDL (Data Definition Language) in database?
- Rename
- Delete
- Grant
- Revoke
- None of the above