1. Default value of an uninitialized instance boolean field is:
Instance fields get defaults; locals don’t. boolean defaults to false.
Get the Preplance app for a seamless learning experience. Practice offline, get daily streaks, and stay ahead with real-time interview updates.
Get it on
Google Play
4.9/5 Rating on Store
Wipro · Java
Practice Java questions specifically asked in Wipro interviews – ideal for online test preparation, technical rounds and final HR discussions.
Questions
25
Tagged for this company + subject
Company
Wipro
View company-wise questions
Subject
Java
Explore topic-wise practice
Go through each question and its explanation. Use this page for targeted revision just before your Wipro Java round.
Instance fields get defaults; locals don’t. boolean defaults to false.
Access cannot be reduced; checked exceptions can be same/narrower; return can be covariant.
Encapsulation (data safety), Abstraction (hide detail), Inheritance (reuse), Polymorphism (flexible behavior).
The compiler applies a ranking (most specific) that can pick unexpected overloads with boxing/widening/varargs.
The pool enables reuse of identical String literals, saving memory and speeding equality checks.
Consistency ensures keys that are equal hash to same bucket and behave correctly.
Comparable defines a natural order in the class itself; Comparator supplies alternative or external orderings without changing the class.
final forbids overriding; private isn’t visible to subclasses. static methods are hidden, not overridden.
Prefer composition to avoid tight coupling and fragile base class—e.g., reuse behavior by delegating to a helper instead of extending.
Overridden instance methods are chosen by the actual object type at runtime.
LinkedHashMap preserves a predictable iteration order: insertion order by default, or access order when configured for LRU-style caches.
Parent-first delegation ensures core classes loaded by bootstrap are trusted, preventing malicious shadowing; custom loaders typically delegate up before defining classes.
javac produces bytecode; the platform-specific JVM interprets/JIT-compiles it, enabling WORA.
Encapsulation bundles state and behavior, typically with private fields and public getters/setters.
Throwable is the root. It has two direct children: Error and Exception. RuntimeException extends Exception. Errors are siblings of Exception, not children of RuntimeException.
They can declare constants but not instance fields; cannot be instantiated; may extend other interfaces.
ArrayList uses a backing array and grows by allocating a larger one then copying.
java.util.concurrent.atomic uses lock-free algorithms built on CAS instructions. They retry on contention instead of blocking, reducing context switching.
volatile guarantees visibility and ordering for a single variable: writes by one thread become visible to others, and reads/writes are not reordered across that variable. It does NOT make compound actions atomic (like ++), nor does it protect invariants across multiple variables. Use locks or atomics for atomicity and compound state changes.
Lambdas close over effectively final variables, just like anonymous classes. They do not require generating a new class per use and can target any compatible functional interface.
Only start() creates a new OS-level thread managed by the JVM. Calling run() is just a normal method call on the current thread.
Stream classes move raw bytes; Reader/Writer classes decode and encode characters using a charset. They’re not interchangeable, but bridges like InputStreamReader and OutputStreamWriter adapt bytes to characters and vice-versa.
JVM searches for a public static void main(String[]). Varargs are allowed but return must be void.
Statics load top-down in hierarchy, then per-instance initialization proceeds super→sub.
G1 uses regions and mixed collections to meet pause goals. CMS is concurrent but largely non-compacting and can suffer fragmentation.
For complete preparation, combine this company + subject page with full company-wise practice and subject-wise practice. You can also explore other companies and topics from the links below.