Stellar Informatics
Army Institute of Nursing Interview Questions and Answers
Q1. Write A program take the name and print the hello user name ?
A program to take user name and print 'Hello, username'
Create a variable to store the user input
Use printf or cout to print the greeting with the user input
Q2. What is collection and collections?
A collection is a group of objects of the same type while collections are classes that implement data structures.
Collections are used to store, retrieve, manipulate, and communicate aggregate data.
Java.util package provides various classes for implementing collections like ArrayList, LinkedList, HashSet, etc.
Collections can be generic or non-generic, ordered or unordered, and allow duplicates or not.
Collections can be used to solve various problems like sorting, searching, fi...read more
Q3. Difference between hash table hash map?
Hash table and hash map are two names for the same data structure that stores key-value pairs.
Both use a hash function to map keys to indices in an array
Hash table is an older term, while hash map is more commonly used in modern programming languages
Java uses the term HashMap, while Python uses the term dict
Hash maps/tables have O(1) average case time complexity for insertion, deletion, and retrieval
Q4. Difference between collection and collections?
collection is an interface in Java that represents a group of objects while collections is a class that provides utility methods for collections.
Collection is an interface while Collections is a class
Collection is a part of Java Collections Framework while Collections is a utility class
Collection is used to represent a group of objects while Collections is used to provide utility methods for collections
Example of Collection: List, Set, Queue, etc.
Example of Collections: sort(...read more
Q5. Connection of database program ?
Database program can be connected using various methods such as JDBC, ODBC, ORM, etc.
JDBC is a Java API for connecting to databases
ODBC is a standard API for connecting to databases
ORM frameworks like Hibernate can be used to connect to databases
Connection string is used to specify the database connection details
Q6. Difference between Set And vector?
Set is an unordered collection of unique elements while vector is an ordered collection of elements.
Set does not allow duplicates while vector can have duplicates.
Set is implemented using hash table while vector is implemented using dynamic array.
Set has faster lookup time while vector has faster iteration time.
Set is useful when uniqueness is important while vector is useful when order is important.
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month