SDLC & Agile Methodology Flashcards

1
Q

What is your Responsibility as an SDET?

A
  • Turn manually executed test scenarios into automatically executed test scenarios via Automation Tools.
  • Design and develop test plans that verify user stories and system requirements.
  • Detect Defects in the application and document them.
  • Involving yourself in the following test types:
    Functional Testing, Regression Testing, Smoke Testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Agile Experience in your most recent project?

A
  • Our sprint is 2 weeks and we have release every 3 sprints as a release cycle. We have 11 people in my team. 5 developers , 3 testers, also 1 SM, 1 BA and 1 PO.
  • We start a sprint with Sprint Planning Meeting and we learn the part of the application which we are going to develop. We groom the planned user stories created by the PO.
  • After sprint starts, we do Daily Standup Meeting everyday morning and we discuss what did we do yesterday, what will we do today and is there any blocker. It’s a daily team sync up to keep us on the same page.
  • End of the sprint, we do Sprint Demo/Review Meeting . It is just to show customer what we build throughout the sprint. PO provides feedback. As an SDET in my team, I have presented the features developed by the team. Client or stakeholders or business people can ask questions about the features developed.
  • After Sprint Demo, we do Sprint Retrospective Meeting. In Sprint Retro, we talk we should start doing, stop doing and continue doing. We go over them and make sure that we don’t make the same mistakes again.
  • This sums up what happens in a typical sprint.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

STLC vs SDLC

A
  • STLC is part of SDLC. It can be said that STLC is a subset of the SDLC set.

SDLC covers the entire software development process, including planning, analysis, design, coding, testing, deployment, and maintenance. STLC is a part of SDLC and focuses specifically on testing. STLC includes activities like test planning, test case development, test execution, defect tracking, and closure.

SDLC (Software DEVELOPMENT Life Cycle):
*1. Requirement gathering and analysis;
*2. Design;
*3. Coding;
*4. Testing;
*5. Deployment;
*6. Maintenance.

STLC (Software TESTING Life Cycle):
*1. Requirement / Design Analysis;
*2. Test Planning: Plan, Estimate, Scheduling;
*3. Test Case Development (Designing): Test Cases, Test Scripts, Test Data, Requirements Traceability Matrix;
*4. Test Environment Setup;
*5. Test Execution: Test Results, Defect Report;
*6. Test Closure Activity (Reporting): Test Result (Final), Test Metrics, Test Closure Report.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

WHERE are your Requirement Documents?

A
  • Requirements convey the expectation of users for the software or product. In other words, all the expected functionalities out of the application are documented in terms of “Requirements”.
  • Currently in my project my requirements are documented as Acceptance Criteria for each User Story.
  • User Stories are created by the PO.
  • Acceptance Criteria are created by the Business Analyst.
  • All Acceptance Criteria will be documented in Confluence.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Where is the Requirements coming from?

A

PO provide requirements for the application by Talking to the:
* End-users that will be using this application the most.
* Partners/Sponsors.
* Domain Experts – coders and developers that have already build this application similar before or someone that is an expert the type of product being built.
* Industry Analysts and Information about competitors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Is the Requirement is GOOD or BAD?

A

** Requirement must be…
SMART: Specific, Measurable, Attainable, Realistic, Testable.
or INVEST: Independent, Negotiable, Valuable, Estimable, Small, Testable.

** Example:
Given I am an Authorized User with valid username and password. I am logging by entering my username and password on the login page. Then I should be logged into the application in 2 seconds or less and I should be able to login Measurable User should able to login very fast (in 2 second after clicking login button).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is AGILE?

A
  • Agile is flexible methodology used for Software Development.
  • You can change requirements and modify requirements anytime.
  • It is dynamic, we are consistently gathering feedback and making adjustments to requirements.
  • Changes are always welcome.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

AGILE Framework Architecture Basics

A

** Roles: Product Owner (PO), Scrum Master (SM), DEV and Testing Teams;
** Ceremonies: Sprint Planning, Daily Scrum, Sprint Review, Sprint Retro, Grooming Session.
** Artifacts: Product backlog, Sprint backlog, Burnout chart.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is WATERFALL Methodology?

A
  • WATERFALL Methodology is the sequential method using for
    Software Development.
  • You CAN’T Go Back and have to finish the phase before you move on.

Waterfall Milestones & Methods:
** Requirements & Planning,
** Design,
** Implementation,
** Verification & Testing,
** Deployment & Maintenance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which AGILE Frameworks did you use in your previous projects ?

A

** I have heard Extreme Programming (XP), Kanban, Feature Driven Development and SCRUM.
** But I have only worked with SCRUM only.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Relation between AGILE and SCRUM?

What is SCRUM?

A

** AGILE is the software development methodology that focuses on customer satisfaction by frequent software delivery.
** SCRUM is one of the many approaches to implement AGILE.
** SCRUM is an AGILE framework.
** SCRUM is suitable for certain type of projects where there are rapidly changing requirements.
** In simple words, AGILE is the methodology and SCRUM is the framework to follow this practice.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why do we need AGILE?
WATERFALL or AGILE?

A

AGILE MODEL:

Approach - Iterative and Incremental
Flexibility - Highly flexible and adaptable
Planning - Minimal planning is enough
Customer Involvement - High level of customer involvement
Risk management - Continuous risk management
Documentation - Minimal documentation required
Time and cost - Challenging to estimate time and cost

WATERFALL MODEL:

Approach - Sequential
Flexibility - Less flexible
Planning - Detailed planning required
Customer Involvement - Low level of customer involvement
Risk management - Risk management at the beginning of the project
Documentation - Extensive documentation required
Time and cost - Easy to estimate time and cost
—————————————-

WATERFALL methodology have following disadvantage:
- *Requirements can’t be change or hard to change once document is signed.
- *Before completing current phase you can’t move to the next phase. Customer can’t see what they are going to get until very late stage in development lifecycle.
- *All phases takes longer time to go to the production. By the time product goes to the market might be outdated already.

AGILE has following advantages:
- *The Requirements changes are welcomed. For example, after the sprint demo if client does not like something we can take their feedback and improve the product.
- *Since it is iterative development process, the development team can developed piece of functionality, get feedback and improve next iteration. So the product will got a continuously improvements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What different roles in SCRUM team you know?

A
  • PRODUCT OWNER - is a responsible to provide a vision of what to build and convey his detailed vision to the team. He is the starting point of an agile scrum software development project. PO creates the user stories and prioritizes the product/sprint backlog.
  • SCRUM TEAM - is formed by the collective contribution of individuals who perform for the accomplishment of a particular project. The team is bound to work for the timely delivery of the requested product.
  • SCRUM MASTER – is the leader and the coach for the scrum team who tracks whether the scrum team is executing committed tasks properly. He is also responsible to increase the efficiency and productivity of the team so that they can achieve the sprint goal effectively.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe your SCRUM TEAM?

A

** Currently in my project we have 11 members in our scrum team.**
* PO - Stephen
* DEV - Linda, Raj, John, James, Ryan and Karan
* TEST - Myself, Arjun and Shelly
* SM - Roger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Have you heard of Scrum of Scrums?

A
  • In case, there are multiple teams involved in the project. Scrum of Scrums is used to focus on projects that collaborate with multiple teams.
  • It supports Agile teams to collaborate and coordinate their work with other teams.
  • It helps focus the meeting towards specific agenda items.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What do “Burn-down Chart” and “Burn-up Chart” mean?

A

“Burn-down Chart” and “Burn-up Chart” are the Scrum Artifacts:

  • To track the progress of an ongoing project, these charts are used.
  • Burn-Up chart indicate the work that has been completed while.
  • Burn-Down chart shows the amount of remaining work in a project.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Definition of Sprint?

A
  • In SCRUM, the project is divided into Sprints.
  • Each Sprint has a specified timeline (2 weeks to 1 month).
  • This timeline will be set for the duration of the project.
  • Here, User Stories are split into different modules.
  • The end result of every Sprint should be a potentially shippable product.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How long is your current Sprint?

A
  • My current sprint duration is 2 weeks.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Product Backlog & Sprint Backlog?

A
  • Product backlog is maintained by the project owner which contains every feature and requirement of the product.
  • Sprint backlog can be treated as subset of product backlog which contains features and requirements related to that particular sprint only.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Velocity of a Sprint and how it is measured?

A
  • Velocity is one of the planning tool used to estimate the speed of the work and time of completion of the project.
  • The calculation of velocity is done by reviewing the work team has
    successfully completed during earlier sprints.
  • For example, if the team completed 5 stories during a two-week sprint and each story was worth 3 story points, then the team’s velocity is 15 story points per sprint.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How often do you release?

A
  • Our Release Cycle is dependent on the Roadmap created by the product owner.
  • Typically we release features every 3 months.
  • However when a critical defect has been reported in production we may do Hotfix releases which are emergency releases to resolve customer issues in our production environment.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How What happens when requirements change in middle of
sprint?

A
  • As part of being in an Agile project we expect requirements to change.
  • When a requirement changes in the middle of a Sprint I will analyze the changes.
  • Based on the changes I will determine the impact and how it affects the work that has been completed. (Does it add more scope or reduces scope?)
  • Based on the impact analysis we will need to re-estimate the user story to ensure the Level of Effort is updated.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is a Software Testing means?

A
  • Process of executing a program or application with the intent of find software bugs using functional and automation tools
  • Process of validating/verifying a software program/application
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Why we test?

A
  • To build bug free application.
  • To satisfied end user and client.
  • To build great product to generate more revenue.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Is 100% testing possible?

A
  • We can’t test the application 100% since there are unlimited scenarios that we can’t even imagine.
  • Software testing is risk based activity based on priority of the functionality we can test as much as much as possible.
  • Even though 100% testing is not possible but I believe 100% customer satisfaction is certainly possible.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Test Plan VS Test Strategy?

A

A Test Plan is a formal document derived from requirement documents, describing in detail the scope of testing and the different activities performed in testing. Whereas, a test strategy is a high-level document describing the way testing will be carried out in an organization.

Test Plan
1. A test plan is derived from Software Requirement Specification (SRS), describing in detail the scope of testing and the different activities performed in testing.
2. A test plan is specific to a particular project.
3. It describes the whole testing activities in detail - the techniques used, schedule, resources etc.
4. It is prepared by Test Lead or Test Manager.

Test Strategy
1. A test strategy is a high-level document describing the way testing is carried out.
2. A test strategy is normally for a complete organization. Although it can be specified for a particular project as well.
3. It describes the high-level test design techniques to be used, environment specifications etc.
4. It is generally prepared by the Project Manager.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is a Test Plan?

A

Test plan is a document that described the testing scope:
* High level test cycle
* Defect life cycle
* Entrance Criteria (defines what all need to start the testing)
* Exit Criteria (defines what the testing is finished)

If you don’t know where to start and where to finish then your goals are not clear.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What is a Test Case?

A

Commonly Test Case has a following structure:

  • Test Case ID
  • Step number
  • Description of the functionality
  • Expected result
  • Actual Result
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

When does Testing start?

A
  • Testing starts from detailed review of the requirements.
  • We have to make sure the requirement is correct in first place.
  • With the wrong requirement it is impossible to build bug free application.
30
Q

What is a Defect Life Cycle?

A
  • New - When the defect has been newly created.
  • Assigned - When the defect has been accepted and assigned to a developer.
  • Rejected - When the bug is rejected due to its invalidity.
  • Deferred - When the bug is prioritized for a later sprint.
  • Open - The defect is awaiting assignment.
  • Fixed - The defect has been fixed.
  • Retested - The defect has been retested.
  • Closed - The defect has been closed.
31
Q

Epic, User stories & Tasks?

A
  • User Stories - defines the actual business requirement. Generally created by Product Owner.
  • Tasks: To accomplish the business requirements development/testing teams create Tasks.
  • Epic: A group of related user stories is called an Epic.
32
Q

What is Testing Hierarchy?

A
  1. Unit testing – Developers test each module or block of code during development.
  2. Component Testing – Component is a standalone functionality that can work by itself. Ex. Amazon Buyer Functionality, Seller Functionality, Prime Video Functionality.
  3. Integration Testing – Combine all of the Functionalities. When I integrate them, can I still use all of the functions? Make sure they all still work.
  4. System Testing – EndtoEnd testing. Test everything from beginning to end.
  5. Acceptance Testing – Hire a UAT (User Acceptance Testing) Team or Business Analyst can also do Acceptance Testing. After testing has been complete you have to get another team to do acceptance testing so they can confirm the QA teams testing was successful and have the product ready for the customer.
33
Q

Requirement Traceability Matrix (RTM) ?

A

RTM is used to make sure that all test cases cover the requirement or not. It is like excel sheet.

We can also say that RTM is an document which shows all the acceptance criteria and the user stories are covered by the Test Cases (Scenario)

Alternative answer:

The Requirement Traceability Matrix (RTM) is a comprehensive document that links and tracks user requirements with corresponding test cases. It consolidates all client-proposed requirements and their traceability into one document, which is typically finalized at the end of the Software Development Life Cycle.

34
Q

What is a Defect means?

A

When expected result does not match actual result it is a defect.

35
Q

What to do when you find a Defect?

A
  • If I find a defect, before report it I re-produce the bug that I need to make sure that is a valid defect.
  • If it is a small issue, I will go to the developer desk, and ask to fix it right away.
  • If it is a big issue, then I open my JIRA and log the defect.
  • If I am not sure it is bug or not I will talk to SME (Subject Matter Expert - it means the person who knows the application better than anyone).
36
Q

If Developer says not a defect, what to do?

A
  • I always make sure that it is a real defect that’s why I reproduce it.
  • I take a screenshots and give all the steps to reproduce the defect
  • Actually one of my biggest challenges that I faced in my current project is that…

FULL Answer

Review the Issue:
* Double-check the Requirements.
* Replicate the Issue.

Document Clearly:
* Detail the Steps.
* Expected vs. Actual Results.
* Evidence (screenshots, logs, or videos).

Communicate Effectively:
* Reach Out to the Developer
* Be Open to Feedback

Involve a Third Party - Seek a Second Opinion.

Update or Clarify Requirements - Clarify Ambiguities.

Document the Decision - Log the Outcome.

Continuous Improvement - Review and Learn.

37
Q

When will you Automate?

A

If it is taking a lot of manual effort. I run at least once manually and after that I automate it. Automation is good for most repetitive functionality.

  • If the test cases are high priority test cases.
  • If the functionality is critical.
  • If the test cases are too long and too difficult to execute. The regression test cases based on the priority.
  • We should automate as much as possible.
38
Q

When will you not Automate?

A
  • If functionality keeps changing.
  • If functionality is used only once during the entire project.
  • Ad-Hoc test can not be automated.
  • Captcha can not be automated.
39
Q

Debugging vs Testing?

A
  • Testing - is about finding defects, ensuring the software functions as intended, and verifying that it meets requirements.
  • Debugging - is about identifying, analyzing, and fixing the defects found during testing or in the production environment.

Both activities are crucial for delivering high-quality software, with testing providing the insights needed to identify issues and debugging providing the means to resolve those issues.

Key Differences

Focus:

  • Testing: Focuses on finding defects.
  • Debugging: Focuses on fixing defects.

Initiation:

  • Testing: Initiated after the software or a part of it is developed.
  • Debugging: Initiated when a defect is identified, typically as a result of testing or user reports.

Nature of Activity:

  • Testing: Systematic and planned, often repetitive, involving both manual and automated processes.
  • Debugging: More investigative and exploratory, often involving manual code inspection and iterative corrections.

Outcome:

  • Testing: Results in a list of identified defects and their severity.
  • Debugging: Results in the removal of defects and modifications to the code.
40
Q

What is Peer review means?

A

Peer review in Quality Assurance (QA) is a process where colleagues review each other’s work to identify defects, suggest improvements, and ensure adherence to quality standards.

This collaborative process is aimed at improving the quality of the software and the efficiency of the QA process itself.

Peer reviews are conducted among people that work on the same team.

For example, a test case that was written by one QA engineer may be reviewed by a developer and/or another QA engineer.

41
Q

Who writes Test Plans and Test Cases?

A

Test Plans are typically written by the QA Lead while Testers usually write Test Cases.

42
Q

Bug Severity vs Bug Priority?

A
  • Bug Severity refers to the level of impact that the bug has on the application or system while Bug Priority refers to the level of urgency in the need for a fix.
  • Usually the Severity is defined in terms of financial loss, damage to environment, company’s reputation and loss of life.
  • Priority of a defect is related to how quickly a bug should be fixed and deployed to live servers.
43
Q

System Testing and Integration Testing?

A
  • For System Testing, the entire system as a whole is checked,
  • Whereas for Integration Testing, the interaction between the individual modules are tested.
44
Q

Black Box vs White Box testing?

A

Both Black Box Testing and White Box Testing are essential for a comprehensive software testing strategy.

Black box testing ensures that the software meets user requirements and behaves correctly from an external perspective, while White Box testing ensures that the internal workings of the software are correct and optimized. Combining both approaches helps achieve higher quality and more reliable software.

=-=-=-=-=-=–=
Black Box Testing:
=-=-=-=-=-=–=
Definition: Testing without knowledge of the internal code structure.
Focus: Functionality and behavior of the software.
Techniques: Equivalence partitioning, boundary value analysis, decision table testing, state transition testing, use case testing.
Perspective: User’s perspective.
Advantages: User-focused, no need for code knowledge, unbiased testing.
Disadvantages: Limited coverage, potential blind spots, relies on quality documentation.
=-=-=-=-=-=–=
White Box Testing:
=-=-=-=-=-=–=
Definition: Testing with knowledge of the internal code structure.
Focus: Internal logic, structure, and code coverage.
Techniques: Statement coverage, branch coverage, path coverage, condition coverage, loop testing.
Perspective: Developer’s perspective.
Advantages: Thorough testing, identifies internal issues, optimizes code.
Disadvantages: Complex and time-consuming, requires skilled testers, not user-centric.

45
Q

Front End Testing and Back End testing?

A

Front End Testing is performed on the Graphical User Interface (GUI), whereas Back End Testing involves databases testing. Front end consist of web site look where user can interact whereas in case of Back end it is the database which is required to store the data.

When user enters data in GUI of the front end application, then this entered data is stored in the back end database. To save this data into the database we write SQL queries.

46
Q

Functional testing & Non-Functional testing

A

Functional testing is a type of testing which verifies that each function of the software application operates in conformance with the requirement specification:
* Unit Testing
* System Testing
* Smoke Testing
* User Acceptance Testing
* Integration Testing
* Regression Testing

Non-functional testing is a type of testing to check non-functional aspects (performance, usability, reliability, etc.) of a software application:
* Performance Testing
* Stress Testing
* Load Testing
* Security Testing

47
Q

What do you do when a production defect is reported?

A
  • In my current company we have a separate JIRA board to monitor production defects.
  • All production defects reported are screened by the product owner where they provide a priority on the ticket.
  • Once the priority is determined, I will begin analyzing the issue reported.
  • I will need to reproduce the defect in an environment that mirrors production like staging.
  • During my analysis I collaborated with my development team to review their code or clarify questions about functionality.
  • Once the analysis is complete it may require a hotfix deployment which a emergency targeted release to resolve the defect for the user.
48
Q

Can you describe the testing process in your company?

A
  • In my current company we practice Agile methodology in a Scrum framework.
  • Prior to the start of the Sprint, we review all the user stories and estimate it based on testing complexity.
  • During Sprint planning we finalize the user stories and our Test Lead assigns the testing responsibility between our team mates.
  • When I am ready to test my user story here are the steps I will follow:
  • Requirement analysis
  • Test planning
  • Test case development
  • Test environment setup
  • Test execution
  • Test cycle closure
49
Q

What information do you include in a bug report?

A

Here are the following elements I will be sure to include in my defect report:

  1. Title.
  2. Steps to reproduce.
  3. Expected Result.
  4. Actual Result.
  5. Evidence.
  6. Severity.
  7. Environment Details.
  8. Link to User Story and Test Case.
50
Q

What is the difference between bug release and bug leakage?

A

Bug Leakage: When a bug is missed by the testing team and found by a customer on the user end, that is considered bug leakage.

Bug Release: Application releases that are intended to resolve production defects reported by users.

Alternative answer:

Bug Leakage refers to the situation when defects that were detected earlier and known to exist in the software system are not fixed before the software is released. Bug Release, on the other hand, is when the software is released with defects that are present but have been given low priority and severity.

51
Q

What is the difference between smoke testing and sanity testing?

A

Smoke: A daily process where we test the core functionalities of the application to ensure its stability before we begin testing it for the day. The Smoke is fully automated and run at 7AM every day. If we our smoke test fails we will report this to the development team for further analysis and hold off on testing the application further until this is resolved.

Sanity: When we focus our testing on end to end for a specific set of modules in our application. Sanity allows us to isolate specific modules to test if we need to verify that there no outstanding defects with the module.

52
Q

How do you approach a situation where requirements are not clearly defined?

A

When requirements are not clear here are some strategies I will do:
1. Set up a meeting with the Business Analyst to clarify the requirements.
2. Asking the Product Owner for some insights on the business case for the feature.
3. Reviewing similar application requirements.
4. Performing Ad Hoc testing to understand the behavior of the functionality.

53
Q

Imagine you have a tight deadline, and the application has critical issues. What steps would you take?

A
  • Managing deadlines and having adequate time management skills are important as a tester.
  • First I would determine the priority of my tasks, and focus on the highest priority items.
  • I would next look which modules have the critical issues, and would sort the issues by riskiest module.
  • If I am unable to deliver my tasks on time, I would proactively inform the Scrum Master to add additional resources or work overtime to deliver the tasks on time.
  • I will my team updated by providing them a daily status in my Scrum StandUp meeting.
54
Q

What are different Test Techniques you are aware of?

A

Here are the Testing Techniques that I am familiar with:
1. Equivalence Class Partitioning.
2. Boundary Value Analysis.
3. State Transition.
4. Error Guessing.
5. Use Case Testing.
6. Decision Table Testing.

55
Q

How do you manage your test cases?

A

Currently we using JIRA as a agile project management tool, we integrated JIRA with X-RAY module which the test management tool we are using.

With X-Ray we can do the following:
* Create Test Cases.
* Group Test Cases.
* Execute and document test results.
* Link test cases to user stories.
* Link Defects to user stories and test cases.
* Create customized analytics and reporting.

56
Q

What is JAVA?

A

JAVA is a multiplatform, object-oriented programming language.

Currently I am using JAVA to automate functional tests to create a efficiency when it comes to the testing process.

57
Q

What are the JAVA components?

A

JVM: Java Virtual machine (JVM) is an abstract machine. It doesn’t physically exist. Whatever Java program we want to run, goes into JVM. And JVM is responsible for loading, verifying and executing the java program. JVM is responsible for converting the byte code to the machine-specific code.

JRE: JRE stands for “Java Runtime Environment”. It physically exists. The Java Runtime Environment provides the minimum requirements such as libraries and Class Loader for executing a Java application on JVM. It consists of the Java Virtual Machine (JVM), core classes, and supporting files.
JRE = JVM + Library Classes

JDK: The Java Development Kit (JDK) is a software development environment used for developing Java applications.
JDK = JRE + Development tools.

JDK includes:
* Java Virtual Machine,
* Java Runtime Environment,
* Loader,
* Java compiler,
* Documentation generator
* Archiver (JAR),
* Other tools needed in Java development.

58
Q

Can you explain the main method in JAVA?

A

The main() is the starting point for JVM to start execution of a JAVA program. During the run time of the class JVM will specifically look for the main method to execute the program.

  • public static void main(String[] args) {}
59
Q

Can you explain the syntax of the main method in JAVA?

A

public static void main(String [] args) {}

public - is an access modifier which is used to specify who can access this method. Public means that this method will be accessible by any Class.

static - is a keyword in java which identifies that it belongs to the class its in.

void - is the return type of the method void means no value will be returned.

main - is the name of the method which is searched by JVM as a starting point for an application with a particular signature only. It is the method where the main executions occurs.

String[] args - it is the parameter passed to the main method.

60
Q

Local, Instance and Static variables

A
  • Local variable is typically used inside a method, constructor, or a block and has only local scope. The best benefit of having a local variable is that other methods in the class won’t be even aware of that variable.
  • Instance variable is a variable which is declared within a class, but outside a method. Instance Variable belongs to the OBJECT. Can be called by object name. Every object of that class will create it’s own copy of the variable while using it. Thus, any changes made to the variable won’t reflect in any other instances of that class and will be bound to that particular instance only.

Numbers default to 0, Objects default to null, Booleans default to false

  • Static (class) variable belongs to the CLASS, can be called through class name. Static variables are declared with the static keyword in a class, but outside a method. Static variables are also called shared variable, it will have only one copy of it. Every object of the class will share the value of it.

https://drive.google.com/file/d/1FqBhKY54LCqTTJ7tDzWodDv91iuLlZoR/view?usp=sharing

61
Q

Explain What is JAVA?

A

JAVA is a widely-used, high-level, object-oriented programming language designed to have as few implementation dependencies as possible. It is a general-purpose language that follows the principle of “write once, run anywhere” (WORA), meaning that compiled JAVA code can run on all platforms that support JAVA without the need for recompilation.

62
Q

Are Java Script and JAVA the same?

A

Although JAVA and Java Script share a similar name, they are fundamentally different in their design, usage, and execution.

Java is a robust, statically typed language used for a wide range of applications, including server-side and enterprise-level applications.

In contrast, JavaScript is a dynamic, lightweight language mainly used for adding interactivity to web pages and, more recently, for server-side development with Node.js.

Their different purposes and environments make each suitable for specific types of development tasks.

63
Q

How do you declare a method in Java?

A

In Java, a method is declared within a class and specifies a block of code that performs a specific task. A method declaration includes the following components:

  • Access Modifier: Defines the visibility of the method (e.g., public, private, protected, or default/package-private if no modifier is specified).
  • Return Type: Specifies the type of value the method returns. If the method does not return a value, the return type is void.
  • Method Name: The name of the method, following standard Java naming conventions (typically camelCase).
  • Parameters: A comma-separated list of input parameters enclosed in parentheses. Each parameter includes a type and a name. If the method takes no parameters, empty parentheses are used.
  • Method Body: A block of code enclosed in curly braces {} that contains the statements to be executed when the method is called.
64
Q

What are the loops in Java?

A

In JAVA, loops are used to execute a block of code repeatedly until a specified condition is met. JAVA provides several types of loops, each serving different purposes and use cases. Here are the main types of loops in JAVA:

  • FOR loop - is used when you know in advance how many times you want to execute a statement or a block of statements.
  • WHILE loop - is used when you want to execute a block of statements repeatedly as long as a condition is true.
  • DO-WHILE loop - is similar to the WHILE loop, but it guarantees that the block of code will be executed at least once, even if the condition is false.
  • Enhanced FOR loop (also known as the “for-each” loop) - is used to iterate over elements of arrays or collections, such as ArrayList or HashSet.
65
Q

What is the difference between the Continue and Break statement?

A

The main difference between Break and Continue statement is that the Break statement stops the entire loop process. Whereas the Continue statement only stops the current iteration of the loop.

66
Q
A

FIVE most usable Type of Operators:

  • Arithmetic +, -, *, /, %
  • Relational ==, !=, >, <, >=, <=
  • Logical &&, ||
  • Bitwise &, |
  • Assignment =, +=, -=, *=, /=, %=
  • Unary operators ++,—, …

… there are THREE more types of operators in JAVA that are used rarely:
* Conditional (ternary) operators,
* Instanceof operators,

67
Q

Can we override the static method of the class?

A

The short answer is - NO.

Static methods in JAVA cannot be overridden. This is because static methods are not associated with the instance of a class, but with the class itself. Therefore, when a subclass inherits a static method from its parent class, it cannot modify the behavior of the static method in any way.

68
Q

Can we have multiple Constructor?

A

The technique of having two (or more) constructors in a class is known as constructor overloading. A class can have multiple constructors that differ in the number and/or type of their parameters.

It’s not, however, possible to have two constructors with the exact same parameters.

69
Q

What is an Object?
What is the Class?

A

A JAVA object is a member (also called an instance) of a JAVA class.

Each object has an identity, a behavior and a state. The state of an object is stored in fields (variables), while methods (functions) display the object’s behavior.

Objects are created at runtime from templates, which are also known as classes.

-=-=-=-=-=-=-=-=
ALTERNATIVE ANSWER:

SUMMARY
Object - An instance of a class, representing a specific entity with state and behavior.
Class - A blueprint for creating objects, defining their attributes and methods.

What is an Object?
An object in Java is an instance of a class that represents a specific entity with state (attributes) and behavior (methods). Objects are created from classes and can hold data and perform operations defined by their class.

Key Characteristics of an Object:

State: Represented by attributes or fields (variables).
Behavior: Defined by methods (functions) that operate on the object’s state.
Identity: Each object has a unique identity, even if two objects have the same state.

What is a Class?
A Class in Java is a blueprint or template for creating objects. It defines the structure and behavior that the objects created from the class will have. A class encapsulates data for the object and methods to manipulate that data.

Key Components of a Class:

Fields (Attributes): Variables that hold the state of the class.
Methods (Functions): Functions that define the behavior of the class.

70
Q

What is the method in JAVA?

A

A Method in Java is a block of code that performs a specific task. It is a fundamental building block in Java programming, allowing you to define behavior for objects and execute code when needed. Methods help in organizing code into reusable sections, promoting modularity and readability.

Components of a Method - Access Modifier, Return Type, Method Name, Parameters, Method Body.

Summary
Methods in Java are essential for defining the behavior of classes and objects, enabling code reuse and better organization. They can accept parameters, return values, and be defined with varying levels of access depending on their intended use.

71
Q
A