Showing posts with label #Programming. Show all posts
Showing posts with label #Programming. Show all posts

16 June 2025

#Generics

#Generics
What are generics in Java?
Why are generics used in Java?
What is the syntax for declaring a generic class?
What is the syntax for declaring a generic method?
What are the benefits of using generics?
Can you use primitives with generics?
What is type erasure in Java generics?
How do you create a generic class?
Can you have multiple type parameters in a generic class?
What are raw types in generics?
What is the difference between List and List?
What is the wildcard ? in Java Generics?
Explain bounded type parameters.
Difference between extends and super in generics.
Can we use generics with arrays?
Why is it not allowed to create an array of generic type?
How does generics affect polymorphism?
What are generic methods? Provide an example.
Can a generic method be static?
How do generics work at runtime?
What is the PECS principle (Producer Extends Consumer Super)?
What are the limitations of Java Generics?
Explain the concept of generic type inference.
How is type safety ensured using generics?
Can you override a method with different generic parameters?
How is generics implemented in Java internally?
Can you use instanceof with generics?
Can you create a generic enum or generic exception class?
What are the differences between generic and non-generic collections?
How does Java handle backward compatibility with generics?
Explain this code: public void show(T t).
What would happen if we use raw types with generics?
Why are generic types not reified?
What is the output of this generic method code snippet? (Give a specific code).
What are the implications of type erasure?
Can you overload methods with different generic return types?
How to create a generic singleton class?
Is it possible to restrict generics to certain classes/interfaces only?
When should you use wildcard generics in method arguments?
Can you assign List to List and vice versa?
Would you like answers or code examples for any of these questions? Or would you like 100+ questions in a PDF format?
What are generic interfaces? Can you provide an example?
Can we have a generic constructor in a non-generic class?
Can we use a generic class without specifying type?
What is the difference between generic class and generic method?
What are the rules for using multiple bounds in generics?
What is the default upper bound of a generic type in Java?
What are the risks of using raw types?
Can we instantiate a generic type at runtime?
How does autoboxing work with generics?
Can you use generics with throws clause in exceptions?
What is a generic factory pattern?
How can generics be used in DAO (Data Access Object) design?
How would you write a type-safe generic comparator?
How can generics be used with reflection?
What is a generic recursive type bound?
Can you have nested generic types like Map>?
What are covariant and contravariant types in generics?
How do you resolve ?unchecked cast? warnings with generics?
What is the effective use of generics in custom collections?
How can you write a type-safe generic builder class?
Why is List not a supertype of List?
Can we create a generic array in Java?
Explain this declaration: Class clazz.
Can generic classes extend or implement other generic classes?
Can we write T[] in a generic method or class?
Why does this code fail: T t = new T();?
What are reifiable and non-reifiable types?
How do generics differ from templates in C++?
What is the purpose of @SuppressWarnings("unchecked")?
How are generic types handled by the JVM?
When should we use unbounded wildcard ?
When should we use ?
When should we use ?
How do wildcards affect method overriding and overloading?
Can you assign List to List?
Why are wildcard captures necessary in some generic code?
Can you use a wildcard as a return type?
What does "capture of ?" mean in compiler errors?
Write a generic method to copy elements from one list to another.
Why does the following code give a compilation error? (Insert code with List list = new ArrayList();)
Can we overload generic methods with different type parameters?
Can we pass a generic method as a parameter?
How do bounded type parameters affect method signatures?
What is the difference between T and E in generics? Are they interchangeable?
Can you use generics with lambda expressions?
How can we sort a List using a generic comparator?
Can you override a generic method in a subclass?
Can you use generic classes in annotations?
How does the Java compiler check for generic type safety?
What tools help detect generic misuse (e.g., static code analyzers)?
How are generics used in the Java Collections API?
How does Java handle generic bytecode?
What are best practices when using generics in library APIs?
How are generics used in popular libraries like Guava or Spring?
When would you choose to not use generics?
Can generic types improve code readability or make it worse?
How do generics affect serialization?
Can generic parameters extend more than one class/interface?
What are F-bounded polymorphism and where is it used?
  • Java Generics - Benefits
  • Generic Class, Interface Syntax , Generic Methods
  • Type Erasure
  • Raw Types and Their Limitations
  • Bounded Type Parameters (extends and super)
  • Wildcard Types in Generics (?, ? extends, ? super)
  • PECS Principle (Producer Extends, Consumer, Super)
  • Type Safety and Compile-Time Checking
  • Generics and Polymorphism
  • Generics with Collections Framework
  • Restrictions and Limitations of Generics
  • Generic Constructors
  • Generic Inheritance and Subtyping
  • Multiple Type Parameters
  • Generics and Reflection
  • Unchecked Casts and SuppressWarnings
  • Generics vs Arrays

13 June 2025

#Serialization

#Serialization
What is Serialization in java?
What is the Marker interface?
What is serialVersionUID?
What will happen if the reference variable is not serializable?
What will happen if a class is serializable but its superclass does not?
What are the most important classes and interfaces using the Serialization?
Why do we need to use Serialization in java?
Why the Serializable interface is called the Marker interface in Java?
How can we implement Serialization in java?
How can we restrict some variables to be serialized?
How to serialize an ArrayList?
When we should use Externalizable interface in Java?
In singleton design pattern serialization becomes an issue, how you will overcome this?
Can you customize the serialization process? How can you achieve this?
Describe the De-serialization process.
Describe the benefits of serialVersionUID.
Describe the methods of serialization and deserialization process.
Do static variables participate in serialization?
Find out the difference between Serialization and Externalizable?
Suppose parent class of a new child class implement Serializable interface, how can you avoid new child class to being serialized?
  • Serializable Interface
  • Marker interface
  • Transient Keyword
  • Static Fields and Serialization
  • serialVersionUID
  • Custom Serialization using writeObject() and readObject()
  • Serialization and Inheritance
  • Deserialization Process
  • NotSerializableException
  • Deep vs Shallow Serialization
  • Serialization in Java Collections
  • Serialization Alternatives (e.g., Externalizable, JSON, XML)

30 September 2024

#CoreJava_Arrays

#CoreJava_Arrays
Question Option A Option B Option C Option D
What is the default value of an element in an array of int in Java? Null_ 0 1 -1
Which of the following correctly declares an array in Java? int arr[] = new int(5); int[] arr = new int[5]; int arr[5]; int arr[] = int[5];
What happens if you try to access an array index out of bounds in Java? Compilation error Program runs with no error ArrayIndexOutOfBoundsException NullPointerException
What is the time complexity for accessing an element from an array by its index? O(n) O(log n) O(1) O(n^2)
Which of the following methods can be used to sort an array in Java? Arrays.sort(arr) Collections.sort(arr) Sort(arr) arr.sort()

30 May 2024

#JDBC

#JDBC
What transaction insulation levels are supported in JDBC
What parts is JDBC from
What is JDBC url
What are the advantages of using JDBC
What is the difference between Statement and PrepareDstate
What is Resultset
What is the difference between Execute, Executequary, Executeupdate
Why do we need Resultset
How to close the connection connection
How to cause a stored procedure
How is the database request and processing the results are carried out
How to register a jdbc driver
How can you install a connection with a database
How Resultset works inside
  • JDBC
  • JDBC driver
  • T1 JDBC-ODBC Drivers
  • T2 Native API Drivers
  • T3 Network Protocol Drivers
  • T4 Native Protocol Drivers
  • Transaction Management
  • Batch Processing - addBatch(), executeBatch, clearBatch()
  • Java.sql.DriverManager (Class)
  • Java.sql.Connection (Interface)
  • Java.sql.Statement (Interface)
  • Java.sql.PrepareStatement (Interface)
  • Java.sql.CallableStatement (Interface)
  • Java.sql.ResultSet (Interface)
  • Java.sql.ResultSetMetaData (Interface)
  • Java.sql.DatabaseMetaData (Interface)
  • Java.sql.Date (Class)
  • Java.sql.Time (Class)
  • Java.sql.Blob (Interface)
  • Java.sql.Clob (Interface)
  • executeQurey() vs executeUpdate() vs execute()
  • Statement: Used to execute static SQL queries
  • PreparedStatement: Used to execute dynamic or parameterized SQL queries
  • CallableStatement: Used to execute stored procedures, cursors, and functions
  • Statement vs PreparedStatement vs CallableStatement

#Java_Versions

#Javascript
Level Topic Subtopics
Basic Introduction History of JavaScript, ECMAScript, JavaScript Engines, Running JavaScript, Use Cases
Variables & Data Types var, let, const, Primitive Types, Reference Types, Type Coercion
Operators Arithmetic, Comparison, Logical, Assignment, Ternary
Control Flow if/else, switch, for, while, do-while, break & continue
Functions Function Declaration, Function Expression, Arrow Functions, Default Parameters, Rest/Spread
Intermediate Objects & Arrays Object Creation, Array Methods (map, filter, reduce), Destructuring, Spread/Rest, Object.assign
Scope & Hoisting Global Scope, Function Scope, Block Scope, Variable Hoisting, Function Hoisting
Closures Definition, Lexical Scope, Practical Use Cases, Module Pattern, Private Variables
DOM Manipulation Selecting Elements, Creating Elements, Event Handling, Class Manipulation, DOM Traversal
Asynchronous JS Callbacks, Promises, async/await, Event Loop, Microtasks vs Macrotasks
Advanced Prototypes & Inheritance Prototype Chain, proto, Object.create, Class Syntax, Inheritance Patterns
Advanced Functions Higher-Order Functions, Currying, Memoization, Partial Application, Function Composition
Error Handling try/catch/finally, Error Object, Custom Errors, Error Propagation, Debugging
Modules ES6 Modules (import/export), CommonJS, AMD, UMD, Dynamic Imports
Event Handling Model Event Bubbling, Event Capturing, Delegation, Passive Listeners, Custom Events
Expert Performance & Optimization Memory Management, Garbage Collection, Event Loop Optimization, Debouncing & Throttling, Lazy Loading
Design Patterns Singleton, Factory, Observer, Module, Revealing Module
Security in JS XSS Prevention, CSP, Sanitization, CORS, Secure Coding Practices
Advanced Async Patterns Generators, Iterators, Observables, Web Workers, Service Workers
JavaScript in Modern Apps ESNext Features, TypeScript with JS, WebAssembly, Micro-Frontends, Edge Computing

1. Basics & Fundamentals

  1. What is JavaScript and how is it different from Java?
  2. Explain the difference between ES5 and ES6.
  3. What are variables in JavaScript?
  4. Differentiate between var, let, and const.
  5. What are primitive data types in JavaScript?
  6. What are reference types in JavaScript?
  7. Explain type coercion in JavaScript.
  8. What is the difference between == and ===?
  9. What are template literals in ES6?
  10. What is the typeof operator?
  11. How do you check if a variable is an array?
  12. What is NaN in JavaScript?
  13. What is the difference between null and undefined?
  14. How do you convert a string to a number in JavaScript?
  15. What are truthy and falsy values?
  16. What is the difference between implicit and explicit type conversion?
  17. What is hoisting in JavaScript?
  18. How does variable shadowing work?
  19. What is the difference between block scope and function scope?
  20. Explain the concept of scope chain.
  21. What is the difference between shallow copy and deep copy?
  22. How do you clone an object in JavaScript?
  23. What is the difference between pass by value and pass by reference?
  24. What are reserved keywords in JavaScript?
  25. What is the difference between synchronous and asynchronous execution?

2. Functions

  1. What is a function in JavaScript?
  2. Differentiate between function declaration and function expression.
  3. What are arrow functions and how are they different?
  4. What are higher-order functions?
  5. What is a callback function?
  6. Explain function currying with an example.
  7. What are default parameters in functions?
  8. What is the rest parameter in ES6?
  9. What is the spread operator in functions?
  10. Explain recursion in JavaScript.
  11. What is the difference between pure and impure functions?
  12. How do you memoize a function?
  13. What is the difference between call, apply, and bind?
  14. How do you implement function overloading in JavaScript?
  15. Explain the concept of closures.
  16. What are immediately invoked function expressions (IIFE)?
  17. What is function hoisting?
  18. Explain anonymous functions in JavaScript.
  19. What are generator functions?
  20. Explain async functions in JavaScript.
  21. What is tail call optimization?
  22. How do you debounce a function?
  23. How do you throttle a function?
  24. What is the difference between named and anonymous functions?
  25. How does the this keyword behave in functions?

3. Objects & Arrays

  1. What are objects in JavaScript?
  2. How do you create an object in JavaScript?
  3. What is object destructuring?
  4. What are object methods in ES6?
  5. Explain the difference between Object.seal and Object.freeze.
  6. What are object prototypes?
  7. How do you check if an object has a property?
  8. How do you loop through object properties?
  9. What are computed property names?
  10. What is Object.assign used for?
  11. Explain the difference between Map and Object.
  12. What is a WeakMap?
  13. What is a WeakSet?
  14. What is the difference between Set and Array?
  15. What are array methods like map, filter, reduce?
  16. Explain the difference between forEach and map.
  17. How do you flatten a nested array in JavaScript?
  18. What is array destructuring?
  19. How do you remove duplicates from an array?
  20. How do you merge two arrays in JavaScript?
  21. What is the difference between slice and splice?
  22. How do you find the maximum value in an array?
  23. What is the difference between find and filter?
  24. What are array-like objects?
  25. What is the difference between mutable and immutable objects?

4. DOM Manipulation

  1. What is the DOM?
  2. How do you select an element by ID in JavaScript?
  3. How do you select elements by class name?
  4. What is the difference between querySelector and querySelectorAll?
  5. How do you create an element in JavaScript?
  6. How do you append a child element?
  7. How do you remove a DOM element?
  8. What is innerHTML vs textContent?
  9. How do you change the style of an element dynamically?
  10. What are DOM events?
  11. What is the difference between inline, inline-block, and block elements?
  12. What is event bubbling in JavaScript?
  13. What is event capturing in JavaScript?
  14. How do you use event delegation?
  15. What is the difference between addEventListener and onclick?
  16. How do you trigger a click event programmatically?
  17. How do you prevent the default behavior of an event?
  18. What is stopPropagation in JavaScript?
  19. How do you handle form validation with JavaScript?
  20. How do you dynamically create and add CSS classes?
  21. How do you toggle a class on an element?
  22. How do you implement drag-and-drop in JavaScript?
  23. How do you detect when the DOM is fully loaded?
  24. What is the difference between DOMContentLoaded and load events?
  25. How do you manipulate attributes of a DOM element?

5. Asynchronous JavaScript

  1. What is asynchronous programming in JavaScript?
  2. What is a callback function?
  3. What is the difference between synchronous and asynchronous code?
  4. What is the event loop in JavaScript?
  5. What are microtasks and macrotasks?
  6. Explain the difference between setTimeout and setInterval.
  7. What is Promise in JavaScript?
  8. What are the states of a Promise?
  9. What is the difference between resolve and reject?
  10. How do you chain promises?
  11. What is Promise.all?
  12. What is Promise.race?
  13. What is Promise.any?
  14. What is Promise.allSettled?
  15. What are async/await keywords?
  16. How do you handle errors in async/await?
  17. What is the difference between async and defer in script tags?
  18. What is callback hell?
  19. How do you avoid callback hell?
  20. What are generators in JavaScript?
  21. What are Observables?
  22. What are Web Workers?
  23. What is the Fetch API?
  24. How does Axios differ from Fetch?
  25. What is JSON and how is it used in async calls?

6. Scope, Execution & Closures

  1. What is lexical scope in JavaScript?
  2. What is the scope chain?
  3. What is the difference between global and local scope?
  4. What is block scope?
  5. What is function scope?
  6. Explain execution context in JavaScript.
  7. What are phases of execution context?
  8. What is variable environment?
  9. Explain closure with an example.
  10. What are use cases of closures?
  11. What is the difference between closure and scope?
  12. How do closures help in data hiding?
  13. What is the difference between module pattern and closures?
  14. What are memory leaks in closures?
  15. What is temporal dead zone (TDZ)?
  16. What is strict mode in JavaScript?
  17. What happens if you forget var/let/const in strict mode?
  18. What is the difference between this inside arrow function and normal function?
  19. How does this keyword behave in different scopes?
  20. What is globalThis?
  21. What is eval in JavaScript?
  22. Why is eval discouraged?
  23. How do closures help in implementing currying?
  24. How do you implement a private counter with closures?
  25. What is the difference between closure and garbage collection?

7. Prototypes & OOP

  1. What is prototype in JavaScript?
  2. What is the prototype chain?
  3. What is proto in JavaScript?
  4. How do you implement inheritance using prototypes?
  5. What is the difference between prototype and class in ES6?
  6. How do you define a class in ES6?
  7. What are class fields in ES6?
  8. What are static methods in classes?
  9. What is the difference between constructor and class methods?
  10. How do you extend a class in ES6?
  11. What is super() keyword?
  12. What is encapsulation in JavaScript?
  13. What is polymorphism in JavaScript?
  14. What is abstraction in JavaScript?
  15. What is the difference between composition and inheritance?
  16. What are mixins in JavaScript?
  17. What is method chaining in JavaScript?
  18. What is the difference between ES6 classes and function constructors?
  19. How do you create a singleton object in JavaScript?
  20. What are private fields in ES2022?
  21. What are getters and setters in classes?
  22. How do you override methods in JavaScript?
  23. What is multiple inheritance in JavaScript?
  24. What is the difference between instanceof and typeof?
  25. How do you check if an object is created from a specific class?

8. Error Handling & Debugging

  1. What is error handling in JavaScript?
  2. What is the difference between syntax error and runtime error?
  3. What is try-catch-finally in JavaScript?
  4. How do you throw custom errors?
  5. What are error objects in JavaScript?
  6. What is stack trace in errors?
  7. How do you handle asynchronous errors?
  8. What is the difference between onerror and addEventListener('error')?
  9. What is the difference between console.log, console.error, and console.warn?
  10. How do you use console.table?
  11. What is the difference between debugger statement and console.log?
  12. How do you use breakpoints in browser DevTools?
  13. How do you debug promises?
  14. How do you debug async/await functions?
  15. How do you monitor network requests in JavaScript?
  16. What are uncaught exceptions?
  17. What are unhandled promise rejections?
  18. How do you handle global errors?
  19. How do you implement error boundaries in frontend apps?
  20. What is try...finally without catch?
  21. How do you create custom error classes?
  22. How do you differentiate between operational and programmer errors?
  23. What is strict mode?s effect on errors?
  24. How do you log errors in production?
  25. What are common debugging tools for JavaScript?

9. Advanced Topics

  1. What are JavaScript modules?
  2. What is the difference between CommonJS and ES6 modules?
  3. What is dynamic import in JavaScript?
  4. What is tree-shaking in JavaScript bundlers?
  5. What is memoization in JavaScript?
  6. How do you implement caching in JavaScript?
  7. What is an EventEmitter?
  8. What is reactive programming in JavaScript?
  9. What are promises vs observables?
  10. What is the difference between synchronous iteration and asynchronous iteration?
  11. What are WebSockets?
  12. How do you implement pub-sub in JavaScript?
  13. What is service worker in JavaScript?
  14. What is push notification API?
  15. What are streams in JavaScript?
  16. How do you use fetch with streams?
  17. What is WebRTC?
  18. What are shared workers?
  19. How does JavaScript handle concurrency?
  20. What are atomics in JavaScript?
  21. What is the difference between BigInt and Number?
  22. What is Intl API in JavaScript?
  23. How do you internationalize a JavaScript app?
  24. What is Proxy in JavaScript?
  25. What is Reflect API?

10. Performance & Best Practices

  1. How do you improve JavaScript performance?
  2. What is debouncing and how do you implement it?
  3. What is throttling and how do you implement it?
  4. How do you optimize loops in JavaScript?
  5. What is lazy loading in JavaScript?
  6. How do you use requestAnimationFrame?
  7. What is the difference between localStorage, sessionStorage, and cookies?
  8. How do you use IndexedDB in JavaScript?
  9. How do you handle memory leaks in JavaScript?
  10. What is garbage collection in JavaScript?
  11. How do you profile JavaScript performance?
  12. What is the difference between minification and compression?
  13. How do you use Web Workers for performance?
  14. How do you handle long-running tasks in JavaScript?
  15. What is event delegation?s role in performance?
  16. What are best practices for writing maintainable JavaScript code?
  17. How do you structure large-scale JavaScript applications?
  18. What is code splitting in modern bundlers?
  19. How do you optimize bundle size in JavaScript apps?
  20. What is tree-shaking in bundlers like Webpack?
  21. How do you optimize React/Angular apps using JavaScript?
  22. How do you secure JavaScript code in frontend apps?
  23. What is CSP and how does it help security?
  24. How do you handle performance bottlenecks in SPAs?
  25. What are common pitfalls to avoid in JavaScript?

#CoreJava

#CoreJava
Level Topic Subtopics
Basic Introduction History of Java, Features, JVM/JDK/JRE, Java Platforms, Bytecode
Variables & Data Types Primitive Types, Reference Types, Type Casting, Wrapper Classes, Constants
Operators Arithmetic, Relational, Logical, Bitwise, Assignment
Control Flow if/else, switch, for, while, do-while, break & continue
Arrays & Strings One-dimensional Arrays, Multidimensional Arrays, String Class, StringBuffer, StringBuilder
OOP Basics Classes, Objects, Methods, Constructors, Access Modifiers
Intermediate Inheritance & Polymorphism extends, super, Overloading, Overriding, Abstract Classes, Interfaces
Exception Handling try/catch, finally, throw, throws, Custom Exceptions
Packages & Access Control Package Creation, Importing, Access Modifiers, Encapsulation, Sub-packages
Collections Framework List, Set, Map, Queue, Iterator
Generics Generic Classes, Generic Methods, Bounded Types, Wildcards, Type Inference
I/O Streams Byte Streams, Character Streams, File Handling, Serialization, Deserialization
Advanced Multithreading & Concurrency Thread Class, Runnable Interface, Synchronization, Executor Framework, Callable/Future
Memory Management Stack vs Heap, Garbage Collection, Finalize(), Memory Leaks, Reference Types (Soft/Weak/Phantom)
JVM Internals Class Loader, Bytecode Execution, JIT Compiler, GC Algorithms, Memory Areas
Java 8+ Features Lambda Expressions, Streams API, Functional Interfaces, Optional, Default & Static Methods in Interfaces
Reflection & Annotations Reflection API, Dynamic Class Loading, Custom Annotations, Built-in Annotations, Retention Policies
Networking Socket Programming, URL & HttpURLConnection, Datagram, RMI
Expert Design Patterns Singleton, Factory, Builder, Prototype, Observer
Advanced Concurrency Locks, Semaphores, Concurrent Collections, Fork/Join Framework, CompletableFuture
JVM Performance Tuning JConsole, JVisualVM, Profiling, Heap Dump Analysis, Thread Dump Analysis
Security in Java Encryption/Decryption, Digital Signatures, SSL/TLS, JAAS, Secure Coding Practices
Best Practices & Coding Standards Immutability, Defensive Copying, Effective Java Practices, Clean Code, SOLID Principles
Java in Enterprise Apps JDBC, JNDI, Servlets, JSP, Integration with Frameworks (Spring/Hibernate)

1. Basics of Java

  1. What is Java and why is it platform-independent?
  2. Explain JVM, JDK, and JRE.
  3. What are the main features of Java?
  4. What is bytecode in Java?
  5. Difference between JDK and JRE.
  6. Explain the structure of a Java program.
  7. What are primitive data types in Java?
  8. Explain reference types in Java.
  9. What are literals in Java?
  10. What is type casting in Java? Explain widening and narrowing.
  11. What are wrapper classes in Java?
  12. Difference between == and equals() in Java.
  13. How does the final keyword work in Java?
  14. Difference between const and final.
  15. Explain static keyword.
  16. How do you declare constants in Java?
  17. What is a variable scope?
  18. Explain operators in Java (arithmetic, relational, logical, bitwise).
  19. How do you use conditional statements in Java?
  20. Difference between if-else and switch.
  21. How do you use loops in Java (for, while, do-while)?
  22. Explain break and continue.
  23. Difference between String, StringBuffer, and StringBuilder.
  24. How do you compare strings in Java?
  25. How are Java comments handled?

2. Object-Oriented Programming (OOP) Concepts

  1. What is a class in Java?
  2. What is an object in Java?
  3. Explain constructors in Java.
  4. What are access modifiers in Java?
  5. Explain encapsulation with example.
  6. What is inheritance in Java?
  7. Difference between single, multilevel, and hierarchical inheritance.
  8. What is polymorphism in Java?
  9. Explain method overloading.
  10. Explain method overriding.
  11. What is abstraction in Java?
  12. Difference between abstract class and interface.
  13. How do you implement interfaces in Java?
  14. What are default and static methods in interfaces?
  15. Can a class implement multiple interfaces?
  16. Explain the super keyword.
  17. Difference between this and super.
  18. What is object casting in Java?
  19. How does Java handle multiple inheritance?
  20. What is aggregation and composition?
  21. Explain association in Java.
  22. What is coupling and cohesion?
  23. How do you make a class immutable?
  24. Difference between mutable and immutable objects.
  25. Explain Object class methods in Java.

3. Exception Handling

  1. What is an exception in Java?
  2. Difference between checked and unchecked exceptions.
  3. How do you use try-catch block?
  4. What is finally block?
  5. Explain throw vs throws.
  6. How do you create custom exceptions?
  7. What is Exception class hierarchy?
  8. Difference between Error and Exception.
  9. How does Java handle runtime exceptions?
  10. Explain NullPointerException.
  11. How to handle ArrayIndexOutOfBoundsException?
  12. How to catch multiple exceptions in Java?
  13. What is the use of multi-catch block?
  14. How to rethrow exceptions?
  15. Explain best practices in exception handling.
  16. How to propagate exceptions in Java?
  17. What is try-with-resources?
  18. Explain AutoCloseable interface.
  19. Difference between throw and return in exception handling.
  20. How do you log exceptions?
  21. Explain ArithmeticException.
  22. What is ClassNotFoundException?
  23. Difference between compile-time and runtime exceptions.
  24. How do you wrap exceptions in Java?
  25. How does JVM handle exceptions?

4. Collections Framework

  1. What is Collections Framework in Java?
  2. Difference between Collection and Collections.
  3. What are List, Set, and Map?
  4. Difference between ArrayList and LinkedList.
  5. How is HashSet different from TreeSet?
  6. Difference between HashMap and Hashtable.
  7. What is LinkedHashMap?
  8. Explain HashMap internal working.
  9. How to iterate over collections in Java?
  10. Difference between Iterator and ListIterator.
  11. What is fail-fast vs fail-safe iterator?
  12. How do you synchronize collections?
  13. Explain Queue and Deque interfaces.
  14. Difference between PriorityQueue and LinkedList queue.
  15. What is a Stack in Java?
  16. Difference between Vector and ArrayList.
  17. Explain Comparable and Comparator interfaces.
  18. How to sort collections in Java?
  19. What is EnumSet and EnumMap?
  20. How to convert arrays to collections?
  21. How to find min/max in collection?
  22. How do you perform filtering using Collections API?
  23. Difference between unmodifiable and immutable collections.
  24. How to shuffle or reverse a collection?
  25. How to remove duplicates from a collection?

5. Generics

  1. What are generics in Java?
  2. Why do we use generics?
  3. Explain generic classes.
  4. Explain generic methods.
  5. Difference between generic class and method.
  6. What are bounded type parameters?
  7. Explain extends keyword in generics.
  8. Explain super keyword in generics.
  9. What is a wildcard ? in Java generics?
  10. Difference between ? extends T and ? super T.
  11. Can you use primitive types in generics?
  12. Explain type erasure in Java.
  13. How does type inference work in Java 8?
  14. How do generics improve type safety?
  15. Explain generic constructors.
  16. Can you create generic arrays?
  17. How do you restrict generic types?
  18. Difference between raw type and generic type.
  19. How do you implement generic interfaces?
  20. How do you implement generic inheritance?
  21. Can generics be used with enums?
  22. How are generics used with Collections?
  23. How do you handle exceptions in generic methods?
  24. Explain best practices for generics.

6. Multithreading & Concurrency

  1. What is a thread in Java?
  2. Difference between process and thread.
  3. How do you create threads in Java?
  4. Explain Thread class vs Runnable interface.
  5. What is Callable and Future?
  6. Difference between start() and run() methods.
  7. Explain thread lifecycle.
  8. What is synchronization in Java?
  9. Difference between synchronized method and synchronized block.
  10. What is reentrant lock?
  11. Explain deadlock with example.
  12. What is thread starvation and thread liveliness?
  13. How do you use ExecutorService?
  14. Difference between fixed thread pool and cached thread pool.
  15. What are concurrent collections?
  16. What is volatile keyword?
  17. Explain wait(), notify(), notifyAll().
  18. How does ThreadLocal work?
  19. Explain fork/join framework.
  20. What is CompletableFuture?
  21. Difference between parallel and sequential streams.
  22. How do you handle exceptions in threads?
  23. Explain daemon threads.
  24. What is thread priority and how does it work?
  25. Best practices in multithreading.

7. Java 8 Features

  1. What are new features in Java 8?
  2. Explain lambda expressions.
  3. Difference between anonymous classes and lambdas.
  4. What are functional interfaces?
  5. How to use @FunctionalInterface annotation?
  6. Explain Stream API.
  7. Difference between sequential and parallel streams.
  8. Explain filter(), map(), collect() in streams.
  9. How do you perform sorting with streams?
  10. Explain Optional class.
  11. Difference between Optional.empty() and Optional.of().
  12. How to avoid NullPointerException with Optional?
  13. Explain default and static methods in interfaces.
  14. How do you use method references?
  15. Explain Predicate, Function, Consumer, Supplier.
  16. How do you perform reduction in streams?
  17. Difference between map() and flatMap().
  18. Explain IntStream, LongStream, DoubleStream.
  19. How do you convert Stream to List/Set/Map?
  20. What is the purpose of forEach() in streams?
  21. How do you handle exceptions in lambda expressions?
  22. How do streams differ from collections?
  23. Explain lazy evaluation in streams.
  24. How to generate infinite streams?
  25. Best practices for Java 8 features.

8. I/O and Serialization

  1. What is Java I/O?
  2. Difference between byte stream and character stream.
  3. Explain FileInputStream and FileOutputStream.
  4. Explain FileReader and FileWriter.
  5. Difference between InputStreamReader and OutputStreamWriter.
  6. How do you read/write text files in Java?
  7. How do you read/write binary files?
  8. What is buffered stream and why use it?
  9. Explain DataInputStream and DataOutputStream.
  10. What is object serialization?
  11. How to serialize an object in Java?
  12. How to deserialize an object in Java?
  13. What is transient keyword?
  14. How do you handle serialVersionUID?
  15. Explain Externalizable interface.
  16. Difference between Serializable and Externalizable.
  17. How to read properties file in Java?
  18. How to write properties file in Java?
  19. How do you copy files in Java?
  20. Explain RandomAccessFile.
  21. How do you use PrintWriter?
  22. What is ObjectInputStream/ObjectOutputStream?
  23. How to compress/decompress files in Java?
  24. How to read/write CSV or JSON files?
  25. Best practices in Java I/O.

9. Reflection & Annotations

  1. What is reflection in Java?
  2. How do you get class metadata at runtime?
  3. How to create objects dynamically using reflection?
  4. How to invoke methods using reflection?
  5. How to access fields using reflection?
  6. Explain method and constructor reflection.
  7. How do you modify private fields using reflection?
  8. What are annotations in Java?
  9. Difference between built-in and custom annotations.
  10. How do you define a custom annotation?
  11. What is retention policy in annotations?
  12. Explain target and documented meta-annotations.
  13. How do you access annotations via reflection?
  14. Difference between @Override and @FunctionalInterface.
  15. How to use annotations in frameworks?
  16. How to create repeatable annotations?
  17. Explain deprecated annotations.
  18. How to validate annotated fields at runtime?
  19. How do annotations affect compilation?
  20. How do annotations affect runtime behavior?
  21. What are marker annotations?
  22. Explain @SafeVarargs annotation.
  23. How do you process annotations with Annotation Processing Tool (APT)?
  24. How are annotations used in Spring/Hibernate?
  25. Best practices for reflection and annotations.

10. Advanced Java Concepts

  1. Explain JVM memory model.
  2. Difference between stack and heap memory.
  3. What are strong, soft, weak, and phantom references?
  4. How does garbage collection work in Java?
  5. Explain different GC algorithms.
  6. What is JIT compiler?
  7. Difference between checked and unchecked exceptions.
  8. Explain class loaders in Java.
  9. How to load classes dynamically?
  10. Difference between static, dynamic, and runtime polymorphism.
  11. Explain method overriding rules in detail.
  12. What is immutability and how to implement immutable classes?
  13. Explain serialization pitfalls and best practices.
  14. How to prevent cloning of an object?
  15. Explain design patterns in Java (Singleton, Factory, Observer).
  16. How to implement thread-safe Singleton?
  17. Explain double-checked locking in Java.
  18. How to optimize Java performance?
  19. Explain memory leaks in Java.
  20. What are best practices in exception handling?
  21. How to use enums effectively in Java?
  22. Explain Java NIO vs standard I/O.
  23. How to implement producer-consumer pattern?
  24. Explain reactive programming basics in Java.
  25. How to write clean and maintainable Java code?
   JVM & Java Basics   
   Java_Versions   
   OOP Concepts   
   Collections   
   Exception_Handling   
   String_Class   
   MultiThread   
   Generics   
   JDBC   
   Java_IO   

23 June 2021

#Collections

#Collections
What is the advantage of Properties file?
What is the advantage of the generic collection?
What is hash-collision ?
What is the default size of load factor in hashing based collection?
What is fail-fast ?
What is the difference between the length of an Array and size of ArrayList?
What is Classes ?
What is Interfaces ?
What is the main benefit of using the Properties file?
What is the need for overriding equals() method in Java?
What is the use of the List interface?
What is Singly Linked List?
What is Doubly Linked List?
What is Stack class?
What is key set view?
What is value set view?
What is entry set view?
What is Circular Queue?
What is Double-ended Queue?
What are the main differences between array and collection?
What are the advantages of the Collection Framework in Java?
What are the various methods provided by the Queue interface?
What do you understand by Collection Framework in Java?
What is BlockingQueue?
What is emptySet()?
What is dictionary class
What is Iterator()?
What is framework in Java?
What is the Collection framework in Java?
What is the hashCode()?
What is a Stack?
What are the benefits of the Collection Framework in Java?
What is a good way to sort the Collection objects in Java?
What are the two ways to remove duplicates from ArrayList?
What is IdentityHashMap?
What are the methods to make collection thread-safe?
What is the peek() of the Queue interface?
What are the important methods used in a linked list?
What are the various ways to iterate over a list?
What are the advantages of the stack?
What is Array?
What is ArrayList?
What is LinkedList?
What is HashMap?
What is Hashtable?
What is LinkedHashMap?
What is TreeMap?
What is HashSet? Methods?
What is LinkedHashSet?
What is TreeSet? Methods?
What is Comparable interface?
What is Comparator interface?
What is Iterator?
What is ListIterator?
What is Spliterator?
What is PriorityQueue?
What is PriorityBlockingQueue?
What is ArrayBlockingQueue?
What is LinkedTransferQueue?
What is CopyOnWriteArrayList?
What is CopyOnWriteArraySet?
What is ArrayDequeue?
What is ConcurrentLinkedQueue?
What is PriorirityBlockingQueue?
What is SynchronousQueue?
What is DelayQueue?
What is LinkedBlockingQueue ?
What is IdentityHashMap ?
What is WeakHashMap?
What is EnumMap?
What is ConcurrentHashMap?
What is unmodifiableCollection
What is ConcurrentSkipListMap?
What is EnumSet?
What is ConcurrentSkipListSet?
What is Collections Class
What is override equals() method
What is equals() with example
What is generic collection?
What is List interface?
What is Set interface?
What is Dequeue interface?
What is Map interface?
What is Big-O notation
What is map. entry In Map
What are the methods to remove elements from ArrayList
What is emptySet() method in the Collections framework?
What are methods provided by the Queue interface?
What is Vector?
What is UnsupportedOperationException
What are the design pattern followed by Iterator
What is diamond operator
What is randomaccess interface
What is deque Interface
What are the various types of queues in Java
What are the important interfaces in the collection hierarchy?
What are the important methods that are declared in the collection interface?
What is vector class? How is it different from an ArrayList?
What is linkedList? What interfaces does it implement? How is it different from an ArrayList?
What are the important interfaces related to the Set interface?
What is the difference between Set and sortedSet interfaces?
What is a HashSet?
What is a linkedHashSet? How is different from a HashSet?
What is a TreeSet? How is different from a HashSet?
What are the important interfaces related to the Queue interface?
What is a priorityQueue?
What is difference between Map and sortedMap?
What is a HashMap?
What are the different methods in a Hash Map?
What is a TreeMap? How is different from a HashMap?
What are the static methods present in the collections class?
What is the difference between synchronized and concurrent collections in Java?
What is compareandswap approach?
What is a lock? How is it different from using synchronized approach?
What is initial capacity of a Java collection?
What is load factor?
What is difference between fail-safe and fail-fast iterators?
What are atomic operations in Java?
What is BlockingQueue in Java?
What is the difference between Linkedlist and Arraylist
What is the difference between hashmap and hashtable
What is the difference between Treeset and Hashset
What is the difference between Arraylist and vector
What is Vector
What are the Java collections
What is Failfast
What is Deque
What is LIST, SET implicitly
What is Capacy of list
What are Java collections
What are the implementations in the collection of the sheet interface
What is Capacy
What is the difference between Hashset and LinkedHashset
What needs to be done to use the Foreach cycle
What restriction is to add to Treeset
What are the main implementations about the collection
What is the level of complexity in Hashset when looking for an element
What will be the speed of access to the element in LinkedList, which is located in the middle
What will be the search speed in linkedlist
What is the search speed in Arraylist
What is the speed of access to the element in Linkedlist by index
What to have inside Hashset and Treeset
What are the main JCF interfaces and their implementation
What is the difference between Java.util.collection and Java.util.collections classes
What will happen when iterator.next () call it without preliminary call iterator.hasnext ()
What the worst time of the Contains () method for the element that is in LinkedList
What is the worst time of the Contains () method for the element that is in Arraylist
What the worst time of the Add () method for linkedlist
What the worst time of the Add () method for Arraylist
What is Identityhashmap for
What is the difference between Hashmap and IdentityHamap
What is the difference between Hashmap and Weakhashmap
What is the ?sorting? of SortedMap, in addition to the fact that tostring () displays all elements in order
What is the assessment of temporary complexity of operations on elements from Hashmap, whether Hashmap guarantees the specified complexity of the sample of the element
What the worst time of the Get (Key) method for the key, which is not in hashmap
What the worst time of the Get (Key) method for the key that is in Hashmap
What will happen if you add elements to Treeset by increasing
What are the ways to sort out the list elements
What is the maximum number of hashcode () values
What are the main SET implementation
What are the main implementation of MAP
What tree lies in the implementation of Treeset
Name the collection classes that gives random element access to its elements
Name the collection classes that implement random access interface
Explain the methods of iterator interface
Explain for each loop with example
Explain about ArrayList with an example?
Explain briefly about Queue interface?
Explain about the Deque interface?
Explain the BlockingQueue interface?
Explain about the new concurrent collections in Java?
Explain about copyonwrite concurrent collections approach?
Explain the meaning of the parameters in the constructor Hashmap (Intialcapacy, Float LoadFactor)
Why Collection doesn?t extend the Cloneable and Serializable interfaces?
Why Map doesn?t extend the Collection Interface?
Why do we need collections in Java?
Why MAP stands apart in the hierarchy of collections
Why added ArrayList if there was already Vector
Why is LinkedList implement both List and Deque
Why is Weakhashmap used
Why MAP is not inherited from Collection
Why you can not use byte [] as a key in hashmap
Why there are no specific implementations of the Iterator interface
Which method is used to sort an array in ascending order?
Which collection implements FIFO service discipline
Which collection implements the discipline of Filo service
Which allows you to make priorityqueue
How internally Hashset working?
How to synchronize List, Set and Map elements?
How to convert ArrayList to Array and Array to ArrayList?
How to make Java ArrayList Read-Only?
How to remove duplicates from ArrayList?
How to reverse ArrayList?
How to sort ArrayList in descending order?
How to synchronize ArrayList?
How to iterate map?
How to measure the performance of an ArrayList?
How to join multiple ArrayLists?
How hash-collision is handled in Java?
How many types of LinkedList does Java support?
How the Collection objects are sorted in Java?
How will you reverse an List?
How to convert ArrayList to Array and Array to ArrayList
How do you iterate around an ArrayList using iterator?
How do you sort an ArrayList?
How do you sort elements in an ArrayList using comparable interface?
How do you sort elements in an ArrayList using comparator interface?
How Hashmap is organized
How Hashmap is related to SET
How to organize a search for Arraylist
How the process works if we want to put something in MAP or get
How much BUCKET can be in hashmap
How to look and delete elements in list
How can we bypass the elements of the collection
How structurally a two -link list looks compared to the single
How the enumeration and iterator differ
How it is the itrable and iterator
How it is interconnected by iterable, iterator and ?for-each?
How the collection behaves if it call iterator.remove ()
How the already instituteed iterator will behave for Collection, if you call collection.remove ()
How to avoid ConcurrentModificationException during the enforcement of the collection
How is the removal of elements from Arraylist, how in this case the size of Arraylist changes in this case
How much additional memory is needed when calling Arraylist.add ()
How much is the addition of memory when calling linkedlist.add ()
How to sort out LinkedList elements in the reverse order without using a slow get (index)
How many transitions are at the time of calling Hashmap.get (Key) on the key that is in the table
How many new objects are created when you add a new element to hashmap
How and when there is an increase in the number of baskets in hashmap
How to sort all the keys Map
How to sort out all MAP values
How to sort through all pairs of "key-meaning" in MAP
How can synchronized objects of standard collections be obtained
How to get a collection only for reading
How to copy the elements of any Collection in an array with one line
How to convert Hashset to Arraylist one line with one line
How to convert Arraylist into Hashset one line with one line
How to get an endless cycle using hashmap
When to use ArrayList and LinkedList?
When does a Java collection throw UnsupportedOperationException?
Who expands whom: Queue expands Deque, or Deque expands Queue
Difference - HashSet vs TreeSet
Difference - HashSet and HashMap?
Difference - HashMap vs TreeMap?
Difference - Array vs ArrayList
Difference - Singly Linked List vs Doubly Linked List
Difference Iterator vs Enumeration?
Difference -Comparable vs Comparator
Difference - Failfast and Failsafe
Difference - Hashmap and Hashtable
Difference - Stack and Queue
Difference - Array and Stack
Difference - Queue vs Deque.
Difference - Set vs Map?
Difference List vs Set.
Difference - Collection vs Collections
Difference - Iterator vs ListIterator
Difference - ArrayList vs LinkedList
Difference - ArrayList and Vector
Will Hashmap work if all added keys will have the same Hashcode ()
Can you add a null element into a TreeSet or HashSet?
Can you use any class as a Map key?
Give example to sort an array in dscending order
Give an example of Hashmap
List down the primary interfaces provided by Java Collections Framework?
List down the major advantages of the Generic Collection.
List various classes available in sets
List methods available in Java Queue interface
Mention the methods provided by Stack class
Tell me about Collection hierarchy
  • List - ArrayList, LinkedList, Vector, Stack
  • Set (SortedSet , NavigableSet) - HashSet, LinkedHashSet, TreeSet
  • Queue (Deque - (ArrayDeque, LinkedList)) - PriorityQueue, ArrayDeque, LinkedList, BlockingQueue , TransferQueue (LinkedTransferQueue), ArrayBlockingQueue, LinkedBlockingQueue, PriorityBlockingQueue, SynchronousQueue, BlockingDeque , LinkedBlockingDeque
  • Map (SortedMap , NavigableMap) - HashMap, LinkedHashMap, TreeMap, WeakHashMap, IdentityHashMap, Hashtable, ConcurrentHashMap, ConcurrentSkipListMap
  • Iterable Interface
  • Comparator Interface
  • RandomAccess Interface
  • Cloneable Interface
  • Serializable Interface
  • ConcurrentMap Interface
  • ConcurrentNavigableMap
  • Delayed Interface
  • DelayQueue
  • Iterable and Spliterator Interface
  • EnumSet and EnumMap

21 January 2021

#Scala

#Scala
What is Scala?
What is Statically-Typed Language and What is Dynamically-Typed Language?
What is the difference between statically typed and dynamically typed languages?
What are the major advantages of Scala Language? Are there any drawbacks of Scala Language?
What is the Main drawback of Scala Language?
What is the main motto of Scala Language?
What are the popular JVM Languages available now?
What is default access modifier in Scala?Does Scala have ?public? keyword?
What is ?Type Inference? in Scala?
What is the relationship between Int and RichInt in Scala?
What is Nothing in Scala? What is Nil in Scala? What is the relationship between Nothing and Nil in Scala?
What is Null in Scala? What is null in Scala? What is difference between Null and null in Scala?
What is Unit in Scala? What is the difference between Java?s void and Scala?s Unit?
What is the difference between val and var in Scala?
What is REPL in Scala? What is the use of Scala?s REPL? How to access Scala REPL from CMD Prompt?
What are the Scala Features?
What is ?Application? in Scala or What is Scala Application? What is ?App? in Scala? What is the use of Scala?s App?
What is an Expression? What is a Statement? Difference between Expression and Statement?
What is the difference between Java?s ?If..Else? and Scala?s ?If..Else??
What is the difference between Function and Method in Scala?
What is PreDef in Scala?
What is Primary Constructor? What is Secondary or Auxiliary Constructor in Scala?
What is the use of Auxiliary Constructors in Scala?Please explain the rules to follow in defining Auxiliary Constructors in Scala?
What are the differences between Array and ArrayBuffer in Scala?
What is case class? What is case object? What are the Advantages of case class?
What is the difference between Case Object and Object(Normal Object)?
What is the usage of isInstanceOf and asInstanceOf methods in Scala? Is there anything similar concept available in Java?
What is the difference between ?val? and ?lazy val? in Scala? What is Eager Evaluation? What is Lazy Evaluation?
What is the Relationship between equals method and == in Scala? Differentiate Scala?s == and Java?s == Operator?
What is Diamond Problem? How Scala solves Diamond Problem?
What is the use of ?object? keyword in Scala? How to create Singleton objects in Scala?
What is apply method in Scala? What is unapply method in Scala? What is the difference between apply and unapply methods in Scala?
What is the main design decision about two separate keywords: class and object in Scala? How do we define Instance members and Static members in Scala?
What is object in Scala? Is it a singleton object or instance of a class?
What is a Companion Object in Scala? What is a Companion Class in Scala? What is the use of Companion Object in Scala?
What is Range in Scala? How to create a Range in Scala?
What are the major differences between Scala?s Auxiliary constructors and Java?s constructors?
What is the use of ?yield? keyword in Scala?s for-comprehension construct?
What is guard in Scala?s for-comprehension construct?
What is the current latest version of Scala?What is the major change or update in Scala 2.12?
What is Option in Scala? What are Some and None? What is Option/Some/None Design Pattern in Scala?
What is Either in Scala? What are Left and Right in Scala? Explain Either/Left/Right Design Pattern in Scala?
What is the equivalent construct of Scala?s Option in Java SE 8? What is the use of Option in Scala?
What are the Advantages of Functional Programming (FP) or Advantages of Pure Functions?
What are the Popular Scala-Based Frameworks to develop RESTful Web Services or REST API?
What is the best Framework to generate REST API documentation for Scala-based applications?
What is the best tool to develop Play/Scala applications to persist data in MongoDB NoSQL data store?
What is the best language to use with Play framework: Scala or Java?
What are the available Build Tools to develop Play and Scala based Applications?
What is SBT? What is the best Build Tool to develop Play and Scala Applications?
What are the available Unit Testing, Functional Testing and/or BDD Frameworks for Play and Scala Based applications?
What is the best Code-coverage tool available for Play and Scala based applications?
What is the best Scala style checker tool available for Play and Scala based applications?
What is the default Unit and Functional Testing Framework for Play? What is the default Build Tool for Play? What is the Default Template Engine for Play? What is the built-in Web Server available in Play Framework?
What is an Anonymous Function In Scala? What is a Function Literal in Scala? What are the advantages of a Anonymous Function/Function Literal in Scala?
What is an Higher-Order Function (HOF)?
What are the differences between Case class and Normal Class?
What are the advantages of Play/Scala stack to develop web applications?
What is call-by-name? Does Scala and Java support call-by-name? What is the difference between call-by-value and call-by-name function parameters?
What are the Java?s OOP constructs not supported by Scala? What are the Scala?s OOP constructs not supported by Java? What are the new OOPs constructs introduced by Scala, but not supported by Java?
What are the popular MVC frameworks for Scala Language to develop Web Applications?
What are major differences between Java-Based and Scala-Based Maven Project?s structure?
What is Extractor in Scala? What is the difference between Constructor and Extractor in Scala? What is the use of Extractor in Scala?
What is the use of ????? in Scala-based Applications?
What is the difference between :: and #:: in Scala? What is the difference between ::: and #::: in Scala?
Explain the main difference between List and Stream in Scala Collection API? How do we prove that difference? When do we choose Stream?
Why Scala does NOT have ?static? keyword? What is the main reason for this decision?
Why Scala is better than Java? What are the advantages of Scala over Java (Java 8)? Compare to Java What are the major advantages or benefits of Scala?
Which IDEs support Play and Scala-Based Applications Development and how?
How do we implement loops functionally? What is the difference between OOP and FP style loops?
How many public class files are possible to define in Scala source file?
How many operators are there in Scala and Why?
How do you prove that by default, Case Object is Serializable and Normal Object is not?
How to define Factory methods using object keyword in Scala? What is the use of defining Factory methods in object?
How does it work under-the-hood, when we create an instance of a Class without using ?new? keyword in Scala? When do we go for this approach?
How do we declare a private Primary Constructor in Scala? How do we make a call to a private Primary Constructor in Scala?
How to implement interfaces in Scala?
How many values of type Nothing have in Scala?
How many values of type Unit have in Scala?
How Scala solves Inheritance Diamond Problem automatically and easily than Java 8?
How Scala supports both Highly Scalable and Highly Performance applications?
When compare to Normal Class, What are the major advantages or benefits of a Case-class?
Difference between Scala?s Int and Java?s java.lang.Integer?
Difference between Array and List in Scala?
Difference between Scala?s Inner class and Java?s Inner class?
In FP, What is the difference between a function and a procedure?
In Scala, Pattern Matching follows which Design Pattern? In Java, ?isinstanceof? operator follows which Design Pattern?
Does Scala support all Functional Programming concepts? Does Java 8 support all Functional Programming concepts?
Does Scala support Operator Overloading? Does Java support Operator Overloading?
Does a Companion object access private members of it?s Companion class in Scala?
If I want to become a Fullstack Scala Developer, which technology stack I should learn?
Is it a Language or Platform? Does it support OOP or FP? Who is the father of Scala?
Is Scala Statically-Typed Language?
Is Scala a Pure OOP Language? Is Java a Pure OOP Language?
Is Scala an Expression-Based Language or Statement-Based Language? Is Java an Expression-Based Language or Statement-Based Language?
Like Java?s java.lang.Object class, what is the super class of all classes in Scala?
Like Java, what are the default imports in Scala Language?
Like Hibernate for Java-based applications, What are the Popular ORM Frameworks available to use in Play/Scala based applications?
Mention Some keywords which are used by Java and not required in Scala? Why Scala does not require them?
Popular clients who are using Play and Scala to develop their applications?
Tell me some features which are supported by Java, but not by Scala and Vice versa?

08 January 2021

#Multithread

#MultiThread
What is the difference between Process and Thread?
What are the benefits of multi-threaded programming?
What is difference between user Thread and daemon Thread?
What are different states in lifecycle of Thread?
What do you understand about Thread Priority?
What is Thread Scheduler and Time Slicing?
What is context-switching in multi-threading?
What is volatile keyword in Java
What is ThreadLocal?
What is Thread Group? Why it?s advised not to use it?
What is Java Thread Dump, How can we get Java Thread dump of a Program?
What is Deadlock? How to analyze and avoid deadlock situation?
What is Java Timer Class? How to schedule a task to run after specific interval?
What is Thread Pool? How can we create Thread Pool in Java?
What will happen if we don?t override Thread class run() method?
What is atomic operation? What are atomic classes in Java Concurrency API?
What is Lock interface in Java Concurrency API? What are it?s benefits over synchronization?
What is Executors Framework?
What is BlockingQueue? How can we implement Producer-Consumer problem using Blocking Queue?
What is Callable and Future?
What is FutureTask class?
What are Concurrent Collection Classes?
What is Executors Class?
What are some of the improvements in Concurrency API in Java 8?
Why thread communication methods wait(), notify() and notifyAll() are in Object class?
Why wait(), notify() and notifyAll() methods have to be called from synchronized method or block?
Why Thread sleep() and yield() methods are static?
Which is more preferred ? Synchronized method or Synchronized block?
How can we create a Thread in Java?
How can we pause the execution of a Thread for specific time?
How can we make sure main() is the last thread to finish in Java Program?
How does thread communicate with each other?
How can we achieve thread safety in Java?
How to create daemon thread in Java?
Can we call run() method of a Thread class?
What is executorservice
What is the idea of multi -seating
What is a process and a stream, how they differ
What is optimistic and pessimistic locks
What is a monitor
What is Volatile
What is Completablefuture
What is synchronization and why it is needed
What is Future
What are the options for synchronization in Java
What is Atomic Types, what are they needed
What is the security of the threads
What is the meaning of the keyword of Volatile and related problems
What is the object of the interface Runnable
What is the semaphore
What does Wait method do
What is a stream of "demon"
What is the meaning of Readwritelock
What is the difference between "competition" and "parallelism"
What is "cooperative multitasking"
What type of multitasking is Java uses, what is the condition of this choice
What is ORDERING
What is AS-IF-SERIAL SEMANTICS
What is Sequential Consistency
What is Visibleity
What is atomicity
What is Mutual Exclusion
What is Safe Publication
What are "green threads" and whether they are in Java
What is the difference between the Start () and Run () methods
What is the difference between notify () and notifyall ()
What is the difference between the Wait () method with the parameter and without the parameter
What is the difference between the methods Thread.sleep () and Thread.yld ()
What is Livelock
What object is synchronization when the Static Synchronized method is called
What are the differences between Volatile and atomic variables
What are the differences between Java.util.conatomic*.compareandswap () and java.util.concurrent.atomic*.weakcompareandswap ()
What does it mean to "sleep" a stream
What is FutureTask
What are the differences between CyclicBarrier and Countdownlatch
What happens when an exception is thrown out in the stream
What is the difference between Interrupted () and Isinterrupted ()
What is a "thread pool"
What size should there be a thread pool
What will happen if the turn of the thread pool is already filled, but a new task is served
What is the difference between the Submit () and execute () methods in the thread pool
What are the differences between the CTEK (stack) and a heap (heap) in terms of multi -use
What is Threadlocal-cross
What are the differences between Synchronized and Reentrantlock
What is a "blocking method"
What is "Framwork for Fork/Join"
What is Double Checked Locking Singleton
What is Busy Spin
Why do you need a program that works in several threads, and not in one
Why might be needed private mjyutex
Why are Wait () and notify () methods only in a synchronized block
Why is the keyword Synchronized
Why is it not recommended to use the Thread.stop () method
How to create a stream
How to adjust the thread priority and how
How to start a stream forcibly
How the Thread.join () method works
How to check whether the threads holds a monitor of a certain resource
How to stop a thread
How to share data between two threads
How to get a dump stream
How to create a streamline Singleton
How are the immutable objects useful
In what states can a stream be
Thread
  • Creating Threads
  • Extending the Thread Class
  • Implementing the Runnable Interface
  • Thread Lifecycle - New, Runnable, Blocked, Waiting
  • Timed Waiting
  • Terminated
  • Thread Priority
  • Synchronization & Thread Safety
  • Synchronized Methods
  • Synchronized Blocks
  • Volatile Keyword
  • Daemon Thread
  • Context Switching
  • ShutdownHook
Multithreading
  • Multithreading
  • Benefits and Challenges of Multithreading
  • Processes vs. Threads
  • Thread Pools
  • Executor Framework
  • ThreadPoolExecutor
  • Callable and Future
  • Fork/Join Framework
  • ThreadLocal in Multithreading
ITC and Synchronization
  • Inter-Thread Communication
  • wait(), notify(), and notifyAll() methods
  • Producer-Consumer Problem
  • Thread Joining
Concurrency Utilities
  • java.util.concurrent Package
  • Executors and ExecutorService
  • Callable and Future
  • CompletableFuture
  • Scheduled ExecutorService
  • CountDownLatch, CyclicBarrier, Phaser, and Exchanger
  • Concurrency vs. Parallelism
Concurrent Collections
  • ConcurrentHashMap
  • ConcurrentLinkedQueue and ConcurrentLinkedDeque
  • CopyOnWriteArrayList
  • BlockingQueue Interface
  • ArrayBlockingQueue
  • LinkedBlockingQueue
  • PriorityBlockingQueue
Atomic Variables
  • AtomicInteger, AtomicLong, and AtomicBoolean
  • AtomicReference and Atomic ReferenceArray
  • Compare-and-Swap Operations
Locks and Semaphores
  • ReentrantLock
  • ReadWriteLock
  • StampedLock
  • Semaphores
  • Lock and Condition Interface
  • Locks (Mutexes) - GIL (Global Interpreter Lock), Spinlocks
Best Practices and Patterns
  • Thread Safety Best Practices
  • Immutable Objects
  • ThreadLocal Usage
  • Double-Checked Locking and its Issues
  • Concurrency Design Patterns
Concurrency Issues and Solutions
  • Starvation - LiveLock, Deadlock
  • Livelocks
  • Race Conditions
  • Strategies for Avoiding Concurrency Issues
Java Memory Model
  • Understanding Java Memory Model
  • Happens-Before Relationship
  • Volatile and Final Fields
Java 9 Features
  • Reactive Programming with Flow API
  • CompletableFuture Enhancements
  • Process API Updates
Java 11 Features
  • Local-Variable Type Inference (var keyword)
  • Enhancements in Optional class
  • New Methods in the String class relevant to concurrency
   DeadLock       Concurrency   

11 November 2020

#CoreJava_08

#CoreJava_08
What were the issues that were fixed with the new Date and Time API of Java 8?
What was wrong with the old date and time?
What is UnaryOperator?
What is Type Inference? Is Type Inference available in older versions like Java 7 and Before 7 or it is available only in Java SE 8?
What is the use of the String::ValueOf expression in Java 8?
What is the use of the peek() method in Java 8?
What is the Supplier Functional Interface?
What is the similarity between Map and Flat map stream operation?
What is the purpose of filter method of stream in java 8?
What is the most common type of Terminal operations?
What is the meaning of functional interfaces in Java 8?
What is the lambda expression in Java and How does a lambda expression relate to a functional interface?
What is the feature of the new Date and Time API in Java 8?
What is the easiest way to print the sum of all of the inumbers present in a list using Java 8?
What is the easiest way to find and remove duplicate elements from a list using Java 8?
What is the easiest way to convert an array into a stream in Java 8?
What is the distinct feature of the Block of Code?
What is the Consumer Functional Interface?
What is the @FunctionalInterface annotation?
What is terminal operation?
What is StringJoiner?
What Is Stream Pipelining in Java 8?
What is statistics collector in Java 8?
What is Spliterator in Java SE 8?
What is skip?
What is Reference to an instance method?
What is Reference to a static method?
What is Reference to a constructor?
What is PremGen? Do we have PermGen in Java 8?
What is Predicate and BiPredicate interface?
What is peek?
What is Optional in Java 8? What is the use of Optional? Advantages of Java 8 Optional?
What is Operator?
What is Nashorn, JavaScript Engine?
What is Multiple Inheritance? How Java 8 supports Multiple Inheritance?
What is MetaSpace? How does it differ from PermGen
What Is map?
What is LocalTime?
What is LocalDateTime APIs?
What is LocalDate?
What is limit?
What Is JJS?
What is Internal Iteration? When do we need to use Internal Iteration?
What is intermediate operation? What are the most commonly used Intermediate operations?
What is Function? BiFunction, UnaryOperator, BinaryOperator?
What is flatmap?
What is Filter operation?
What is External Iteration? When do we need to use External Iteration?
What is distinct?
What is Diamond Problem in interfaces due to default methods? How Java 8 Solves this problem?
What is Diamond Problem in Inheritance? How does Java 8 solve this problem?
What is default method?
What is Consumer and BIConsumer interface?
What is ChronoUnits in Java 8?
What is BinaryOperator?
What is BiFuction?
What is a type interface?
What Is a Stream? How Does It Differ from a Collection
What is a stream, and how does it differ from a collection
What is a Stream API? Why do we require the Stream API?
What is a Static Method? Why do we need Static methods in Java 8 Interfaces?
What is a Functional Interface? What is SAM Interface?
What is :: (double colon) operator-Method References in Java 8?
What does the String::ValueOf expression mean?
What does the peek() method does? When should you use it?
What does the flatmap() function do? Why do we need it?
What do you mean by chromounits in java8?
What are type annotations? Name some common type annotations.
What are the various categories of pre-defined function interfaces?
What are the types of Method References available in java 8
What are the types and common ways to use lambda expressions?
What are the sources of data objects a Stream can process?
What are the similarities between map and flatMap stream operations in Java 8?
What are the main components of a Stream?
What are the important packages for the new Data and Time API?
What are the guidelines that are needed to be followed in Functional Interface?
What are the defining rules of a functional interface?
What are the core API classes for date and time in Java 8?
What are some standard Java pre-defined functional interfaces?
What are some of the examples of terminal operations in Java 8?
What are repeating annotations?
What are functional or SAM interfaces?
What are different ways to create Optional
What are default methods in Java 8?
What are collectors in Java 8?
Why was a new version of Java needed in the first place?
Why lambda expression is called a poly expression?
Why do we need new Date and Time API in Java SE 8?Explain how Java SE 8 Data and Time API solves issues of Old Java Date API?
Why do we need change to Java again?
Which class implements the encoder used for encoding byte data in Java 8?
How will you get current date and time using Java 8 Date and TIme API?
How to remove the duplicate elements from the list.
How to join the all employee names with ?,? using java 8?
How to group by employee name from the list?
How to filter all the employee whose age is greater than 20 and print the employee names using java 8
How to count number of employees with age 18?
How is the Parameter List of Lambda Expression different from the Lambda Arrow Operator
How is a Base64 encoder that encodes URLs created in Java 8?
How is a Base64 decoder created in Java 8?
How do we find maximum age of employee?
How do sort all the employee on the basis of age?
How can you print the date of the next occurring next weekdays using Java 8?
How are Collections different from Stream
When do we go for Java 8 Stream API? Why do we need to use Java 8 Stream API in our projects?
Difference - Map and flatMap Stream Operation
Difference - Limit and Skip?
Difference - findFirst() and findAny()
Difference - Collection API and Stream API
Difference - Iterator and Spliterator
Difference - Predicate and Function
Difference - PermGenSpace and MetaSpace
Difference - Map and FlatMap stream operation
Difference - OLD Java Date API vs Java 8's Date vs Time API
Difference - Intermediate Operations and Terminal Operations
Difference - Functional Programming and Object-Oriented Programming
Difference - findFirst() and findAny()
Difference - Collection API and Stream API
Difference - Internal iteration and External iteration
What is Stream in Java?
What is a functional interface
What is Lambda
What mechanism is used in the implementation of parallel streams
What is a link to the method and how it is realized
What innovations appeared in Java 8 and JDK 8
What variables have access to lambda-expression
What types of links to methods do you know
What is Stringjoiner
What is a Static interface method
What are the ways to create stream
What is the difference between Collection and Stream
What is the Collect () method in straps for
What final methods of working with streams do you know
What intermediate methods of working with streams do you know
What additional methods for working with associative arrays (Maps) appeared in Java 8
What is LocalDetetime
What is ZoneDDATETEME
What is NASHORN
What is JJS
What class appeared in Java 8 for coding/decoding data
Explain the expression system.out :: println
Why are the MAP () and Maptoint (), MaptodOble (), Maptolong () are intended in streams.
Why in straps the LIMIT () method is intended
Why is the Sorted () method intended in streams
Why are the Flatmap (), Flatmaptoint (), FlatmaptodOble (), Flatmaptolong () methods for straps are intended for streams.
Why are the functional interfaces of Unaryoprator, Doubleunaryoprator, IntunaryOperator, Longunaryoprator
How to sort the list of lines using lambda expression
How to call the Default interface method in the class implementing this interface
How to call a static interface method
Functional Programming Enhancements
  • Lambda Expressions
  • Functional Interfaces
  • Method References
  • Constructor References
  • Default Methods in Interfaces
  • Static Methods in Interfaces
Streams and Data Processing
  • Stream API (Sequential and Parallel)
  • Intermediate Stream Operations (filter, map, sorted, etc.)
  • Terminal Stream Operations (collect, forEach, reduce, etc.)
  • Collectors Utility Class
  • Grouping and Partitioning (groupingBy, partitioningBy)
  • Parallel Streams
Optional API (Avoiding Nulls)
  • Optional Class Basics
  • of(), ofNullable(), empty()
  • isPresent(), ifPresent()
  • orElse(), orElseGet(), orElseThrow()
Date and Time API (java.time)
  • LocalDate, LocalTime, LocalDateTime
  • ZonedDateTime, OffsetDateTime
  • Period and Duration
  • Date Formatting and Parsing (DateTimeFormatter)
Type and Repeating Annotations
  • Type Annotations
  • Repeating Annotations
Scripting & Miscellaneous
  • Nashorn JavaScript Engine (deprecated in Java 15)
  • Interface Evolution without Breaking Code
  • Improvements in Method Parameter Reflection

Most views on this month

Popular Posts