Mahesh Parahar

Mahesh Parahar

147 Articles Published

Articles by Mahesh Parahar

Page 4 of 15

Difference between Java and Kotlin in Android with Examples

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 367 Views

Kotlin was introduced for Android development as a modern alternative to Java, offering concise syntax, null safety, and many language-level improvements. Google announced Kotlin as the preferred language for Android development in 2019. Code Comparison Examples Kotlin reduces boilerplate code significantly compared to Java − Setting Text on a View // Java: requires casting and explicit reference TextView displayText = (TextView) findViewById(R.id.textView); displayText.setText("Hello World"); // Kotlin: concise with synthetic view binding textView.setText("Hello World") Null Safety // Kotlin enforces null check at compile time var value: String = "abc" ...

Read More

Difference between Google Fi and Ting

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 424 Views

Both Google Fi and Ting are Mobile Virtual Network Operators (MVNOs) that provide telephone calls, SMS, and mobile broadband services using existing cellular networks and WiFi. They differ primarily in pricing models − Google Fi offers fixed monthly plans, while Ting follows a pay-as-you-go approach. Google Fi Google Fi is a wireless service provider operated by Google. It offers access to multiple cellular networks and seamlessly switches between them for the best signal. In the US, Google Fi operates on T-Mobile, Sprint, and US Cellular networks. Plans start at $20 per month and include unlimited calls, messages, WiFi ...

Read More

Difference between Basic Disk and Dynamic Disk

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 3K+ Views

Both basic disk and dynamic disk are disk configurations available in the Windows Operating System. A basic disk has been available since the early days of DOS and Windows. Dynamic disk was introduced with Windows 2000 and offers more flexible storage management. Basic Disk Basic Disk configuration works on the concept of partitions, partition tables, and logical drives. A disk can have up to four primary partitions, or three primary partitions and one extended partition containing multiple logical drives. The following operations can be performed − Create/Delete primary or extended partitions Create/Delete logical drives within an ...

Read More

Difference between Facial Recognition and Face ID

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 945 Views

Facial Recognition and Face ID are both face-based biometric technologies, but they differ in implementation and accuracy. Facial recognition is a general-purpose technology used across many devices and platforms, while Face ID is Apple's proprietary, advanced face recognition system built specifically for iPhones and iPads. Facial Recognition Facial recognition is a technique in which a person is identified using their face. The system captures facial details, analyzes key features (distance between eyes, jawline shape, etc.), and compares them with an existing database of known faces to find a match. Facial recognition is used in smartphones, security cameras, airports, ...

Read More

Explain difference between == and is operator in Python.

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 367 Views

In Python, == and is are both comparison operators but they check different things. == checks if two objects have the same value (equality), while is checks if two variables point to the same object in memory (identity). == Operator (Equality) The == operator compares the values of two objects. If the values are equal, it returns True, regardless of whether they are stored at different memory locations. is Operator (Identity) The is operator checks whether two variables refer to the exact same object in memory (same id()). Even if two objects have equal values, is ...

Read More

Difference between Inverted Index and Forward Index

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 2K+ Views

Inverted Index and Forward Index are data structures used to search text within a document or a collection of documents. They differ in how they map the relationship between words and documents − one indexes by word, the other by document. Forward Index A forward index stores the document name as the key and maps it to the list of words contained in that document. It answers the question: "What words does this document contain?" Inverted Index An inverted index stores each word as the key and maps it to the list of documents that contain ...

Read More

Difference between two given time periods in C++

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 527 Views

Given two time periods in HH:MM:SS format where HH represents hours, MM represents minutes, and SS represents seconds, find the difference between them in the same format. The approach uses borrowing (similar to subtraction in arithmetic) when seconds or minutes of the smaller time are greater. Worked Example Time period 1 = 8:06:02 Time period 2 = 3:09:03 Step 1: Seconds: 02 < 03, borrow 1 minute → 62 - 03 = 59 seconds Step 2: Minutes: 05 < 09, borrow 1 hour → 65 - 09 = 56 minutes Step 3: Hours: ...

Read More

Differences between Data paths.

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 1K+ Views

A CPU has two main sections: the data section (data path) and the control section. The data path consists of registers, ALU, and interconnection buses that carry out the actual data processing. Data paths are classified into three types based on how instructions are executed − Single Cycle, Multiple Cycle, and Pipeline. Single Cycle Data Path In a single cycle data path, each instruction completes in exactly one clock cycle. The clock cycle must be long enough to accommodate the slowest instruction, which wastes time for simpler instructions. Multiple Cycle Data Path In a multiple cycle ...

Read More

Difference between Traits and Abstract Classes in Scala.

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 1K+ Views

In Scala, both traits and abstract classes can contain abstract and non-abstract methods. Traits are similar to Java interfaces (with default methods), while abstract classes are similar to Java abstract classes. The key difference is that traits support multiple inheritance, while abstract classes support only single inheritance. Traits Traits are created using the trait keyword. They can contain both abstract and concrete methods. A class can mix in multiple traits using the with keyword, and traits can also be added to individual object instances at creation time. Abstract Classes Abstract classes are created using the abstract ...

Read More

Difference between the largest and the smallest primes in an array in Java

Mahesh Parahar
Mahesh Parahar
Updated on 14-Mar-2026 1K+ Views

Given an array of integers (all elements less than 1, 000, 000), find the difference between the largest and smallest prime numbers in the array. Worked Example Array: [1, 2, 3, 4, 5] Primes in array: 2, 3, 5 Largest Prime = 5 Smallest Prime = 2 Difference = 5 - 2 = 3 Solution Approach Use the Sieve of Eratosthenes to pre-compute all prime numbers up to 1, 000, 000. Then scan the array to find the largest and smallest primes and return their difference. The sieve runs in ...

Read More
Showing 31–40 of 147 articles
« Prev 1 2 3 4 5 6 15 Next »
Advertisements