Posts

Showing posts from July, 2023

CoreJava-Interview Prep - 1

                                                                    Java - Interview Prep - 1 Object-Oriented Programming Principles (Inheritance, Polymorphism, Encapsulation, Abstraction): Describe a situation where you used inheritance in a project to achieve code reusability and explain the benefits it provided. Can you give an example of polymorphism in your previous work experience? How did it enhance the flexibility and extensibility of the codebase? Share a scenario where you applied encapsulation to enforce data hiding and ensure proper access to class members. Discuss a situation where you utilized abstraction to create a well-defined interface and implemented it in multiple classes to provide different functionalities...

CoreJava - Basics – Assignment - 1

  Core Java Basics – Assignment - 1   Assignment 1: Create a class called "Book" with the following attributes: title (String), author (String), year (int), and price (double). Creates an instance of the Book class, sets its attributes, and prints them out. Assignment 2: Create a class called "BankAccount" with attributes: accountNumber (String) and balance (double). Include a method called "deposit" that takes a parameter for the amount to be deposited and updates the balance accordingly. Include a method called "withdraw" that takes a parameter for the amount to be withdrawn and updates the balance if sufficient funds are available. Write a main method that creates an instance of the BankAccount class, performs a deposit and a withdrawal, and prints the resulting balance. Assignment 3: Create a class called "Person" with the following attributes: name (String), age (int), and address (String) and prints them out. Assignment ...

React JS FAQs Final Set 1

  React JS FAQS Final Set 1   1.        What is React? 2.        What are the key features of React? 3.        How does React differ from other JavaScript frameworks? 4.        Explain the Virtual DOM in React. 5.        What is JSX? 6.        What are the advantages of using JSX? 7.        How do you define a React component? 8.        What is the difference between functional and class components? 9.        How do you create a stateful component in React? 10.    What is the significance of setState() in React? 11.    Explain the lifecycle methods of a class component. 12.    What is the componentDidMount() method used for? 13.    How can you p...