Wipro interview prep
6 practice questions on the topics candidates reported from Wipro interviews, with answers. The questions are ours; each one links to the interview report that names its topic.
Java 1
-
Does Java support multiple inheritance?
- Yes, a class can extend several classes
- No, and a class can implement only one interface
- Not of classes: a class extends one class, but it can implement several interfaces
- Only abstract classes can extend several classes
Show the answer
C. Not of classes: a class extends one class, but it can implement several interfaces
Java avoids the diamond problem for state by allowing a single superclass. Interfaces give multiple inheritance of type; if two default methods clash, the class must override the method.
This topic is named in a candidate’s interview report: Elite NTH interview, 2022, on GeeksforGeeks.
Python 1
-
What does this print?
print(type(5).__name__, isinstance(5, object), (5).bit_length())- int True 3
- int False 3
- number True 5
- int True 5
Show the answer
A. int True 3
Even 5 is an object of class int with its own methods: bit_length() is 3 because 5 is 101 in binary. Everything in Python, including functions and classes, is an object, which is why it is called object-oriented.
This topic is named in a candidate’s interview report: Elite business discussion, 2025, on Reddit.
OOP 1
-
In Java, who can use a protected member that could not use a private one?
- Any class anywhere
- Nobody; protected and private behave the same
- Only static methods of the class
- Other classes in the same package, and subclasses even in other packages
Show the answer
D. Other classes in the same package, and subclasses even in other packages
private allows only the declaring class. Package-private (no modifier) adds the same package, protected adds subclasses elsewhere too, and public allows everyone.
This topic is named in a candidate’s interview report: Elite NLTH project engineer interview, 2021, on GeeksforGeeks.
DBMS and SQL 3
-
How does TRUNCATE TABLE differ from DELETE FROM a table with no WHERE?
- They are identical in every database
- TRUNCATE drops the table definition too
- DELETE cannot remove every row
- TRUNCATE removes every row at once without logging each one or firing row triggers, and usually cannot take a WHERE
Show the answer
D. TRUNCATE removes every row at once without logging each one or firing row triggers, and usually cannot take a WHERE
DELETE removes rows one by one, can filter with WHERE and fires row triggers. TRUNCATE deallocates the data in bulk, which is much faster on big tables, and the table itself remains. Whether it can be rolled back depends on the database.
This topic is named in a candidate’s interview report: Elite NLTH project engineer interview, 2021, on GeeksforGeeks.
-
Which of these is a DML command rather than a DDL command?
- CREATE
- ALTER
- DROP
- UPDATE
Show the answer
D. UPDATE
DML (data manipulation) changes the rows: INSERT, UPDATE, DELETE and, by most definitions, SELECT. DDL (data definition) changes the structure: CREATE, ALTER, DROP and TRUNCATE.
This topic is named in a candidate’s interview report: Elite NTH interview, 2022, on GeeksforGeeks.
-
Without a join, how do you get the rows of two tables with the same columns, such as current_staff and former_staff, in one result?
- SELECT name FROM current_staff UNION SELECT name FROM former_staff; (UNION ALL keeps duplicates)
- SELECT name FROM current_staff, former_staff;
- SELECT name FROM current_staff AND former_staff;
- It cannot be done without a join
Show the answer
A. SELECT name FROM current_staff UNION SELECT name FROM former_staff; (UNION ALL keeps duplicates)
UNION stacks the rows of two queries with matching columns and removes duplicates; UNION ALL is faster because it does not. Listing both tables with a comma is a cross join, every pairing of rows.
This topic is named in a candidate’s interview report: Elite business discussion, 2025, on Reddit.