• corejava

    What is application

    An application refers to a program or software designed to perform specific tasks for users. Applications can range from simple tools like calculators to complex systems such as enterprise resource management platforms. Types of Applications To develop distributed application we use a language called java and java comes under internet software. Architecture required for development of distributed application , programmer must use a well known Architecture known as client server architecture . 2-Tier Architecture Two tier Architecture it contains client and server side programing . 3-Tier Architecture Three tier architecture it contains client , server program and database software n-Tier Architecture n tire architecture it contains client program , fire…

  • Multithreading

    Multiple Locks Using Synchronization

    Multiple locks using synchronized blocks in Java is a concept where you create synchronization around different parts of the code by locking on different objects, instead of synchronizing the whole method or relying on a single lock. This allows multiple threads to access separate synchronized blocks simultaneously if the locks they are accessing are different, thereby improving concurrency and performance. the synchronized block allows you to define a critical section and specify which object’s lock should be used to control access. Multiple locks can be achieved by creating separate objects and synchronizing blocks on these different objects. Purpose of Using Multiple Locks Example without Synchronization Output Explanation of Above code…

  • Multithreading

    What is Multithreading

    Multithreading is a programming technique that allows a single process to run multiple threads concurrently. Threads are smaller, lightweight units of a process that share the same memory and resources. By using multithreading, programs can perform multiple tasks at the same time, making them more efficient and responsive. Threads within the same process share memory and resources, making them lightweight and efficient for performing tasks in parallel. Multithreading is useful in below Scenario Parallel Execution: Multithreading enables different parts of a program to run concurrently, improving performance and responsiveness. Improving performance : By allowing threads to run concurrently, multithreading can make better use of cpu resources, leading to faster execution…