<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sowjanya Sunkavalli on Medium]]></title>
        <description><![CDATA[Stories by Sowjanya Sunkavalli on Medium]]></description>
        <link>https://medium.com/@sunkavallisowjanya?source=rss-ebf164f663df------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kjd6ILD1i00Iz_iV85BpWg.png</url>
            <title>Stories by Sowjanya Sunkavalli on Medium</title>
            <link>https://medium.com/@sunkavallisowjanya?source=rss-ebf164f663df------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 11:29:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sunkavallisowjanya/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What is Object Oriented Programming? What are OOPS concepts in Java?]]></title>
            <link>https://medium.com/@sunkavallisowjanya/what-is-object-oriented-programming-what-are-oops-concepts-in-java-4f693f172f0c?source=rss-ebf164f663df------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f693f172f0c</guid>
            <category><![CDATA[oops-concepts]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[oops-interview-questions]]></category>
            <dc:creator><![CDATA[Sowjanya Sunkavalli]]></dc:creator>
            <pubDate>Mon, 31 Oct 2022 05:22:12 GMT</pubDate>
            <atom:updated>2022-10-31T05:22:12.689Z</atom:updated>
            <content:encoded><![CDATA[<h4>BASICS OF JAVA</h4><p>Hello Everyone🙌</p><p>Hope everyone is going great with your continuous learning.✌️</p><p>Lets, Jump into the Topic…Okay, we keep on hearing Object Oriented Programming, and OOPS Concepts in our everyday coding life…</p><p>What actually Object Oriented Programming and why it is called so?</p><p>What are OOPS Concepts that everyone says are pillars for Object Oriented Programming?</p><p>Okay, in this blog we will learn briefly about this topic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*0PiKOVy1HV8xnhMIrYNVrA.png" /></figure><h4>What is Object Oriented Programming?</h4><p>Java is called an Object Oriented Programming Language. This means in a simple way we can say everything in Java Programming is considered an Object which contains data and functions and this object belongs to a particular class. Here class is a type of entity and object is instance of class.</p><p>Not only Java the majority of widely used programming languages, including Python, C++, C#, Ruby, etc., adhere to the object-oriented paradigm.</p><h4>Major Advantage of Object-Oriented Programming</h4><p>In the end, object-oriented programming is all about taking a complex issue and breaking it down into manageable pieces. You create a class that accomplishes what you require for each mini-problem. Then, the best part, you can reuse those classes, which speeds up solving the subsequent problems.</p><p>Okay, we have been told that Object Oriented Programming Language consists of Class and Object.</p><h4>What are Class and Object?</h4><p><strong><em>Classes are user-defined data types that act as the blueprint for individual objects, attributes and methods.</em></strong></p><p><strong><em>Objects are instances of a class created with specifically defined data.</em></strong> Objects can correspond to real-world objects or abstract entities.</p><p>For Example, let’s say a Car is a type of Class whereas its instances such as a Tesla, Toyota, Ford etc serve as an Object of Class Car.</p><p>As we said that Class contains Attributes(state) and Methods (Behaviour), we can consider the following as Class Car attributes and Methods.</p><p>Attributes can be the Price, Speed, Color, Weight etc., of the car.</p><p>Methods can be changeGear(), slowSpeed(), brake() etc.,</p><p>When coming to the Object, let&#39;s Say the Object is Mini cooper.</p><p>So here Mini cooper is an instance of a Class Type Car and it has defined specific attributes and Methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/0*TIKDV7YrJmCI7u2D.jpg" /><figcaption>Class and Object (Source: codeavial)</figcaption></figure><p>So far we have seen a brief idea on Class and Object, let’s jump into the Principles of Object Oriented Programming language i.e Inheritance, Polymorphism, Abstraction and Encapsulation.</p><p>In this blog we will learn briefly about the Principles in the coming blog we will learn the in-depth details of each Principle.</p><h4>Inheritance</h4><p>The concept of inheritance in Java refers to the transfer of properties from one class to another, such as the relationship between a Mom and daughter. <strong><em>Inheritance in Java is a process of acquiring all the behaviours of a parent object to child object.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*EorQ0nbnZKpBDiJJUlqchw.jpeg" /><figcaption>Inheritance</figcaption></figure><p>In the above figure, we can see say inheritance as daughter class inheriting the variables and methods of the mom parent class. Here Mom is called Base class or Parent Class and Daughter is called Derived Class or Child Class.</p><p>Here, Inheritance is furthur classified into 4 types as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ufpSjkBl5nWZET7J.jpg" /><figcaption>Types of Inheritance (Source : Simple Snippets)</figcaption></figure><h4>Polymorphism</h4><p>Polymorphism, where “poly” stands for numerous and “morph” for form, refers to taking on several forms. It refers to an object’s, function’s, or variable’s capacity to assume several forms.</p><p>It is the ability of a class to offer various implementations of a method depending on the kind of object that is passed to the method. <strong>To put it simply, polymorphism in Java allows us to perform the same action in many different ways.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*P6XpqJnQLCNVuP7KdlrEWg.jpeg" /></figure><p>Polymorphism is furthur divided into two types as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XGVfXEdFX-tNVCVM.png" /><figcaption>Polymorphism Types (Source : Simplileran)</figcaption></figure><h4>Abstraction</h4><p>Data abstraction is the process of withholding some information from the user and only displaying what is absolutely necessary. Abstract classes or interfaces can be used to accomplish abstraction.</p><p><strong><em>Simply said, abstraction “displays” only the necessary features of objects while “hiding” the unnecessary specifics.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*phS_9XYcUGC4kGAzTGdnXQ.jpeg" /><figcaption>Abstraction</figcaption></figure><p>Abstraction in Java is achieved by using Abstract class and Interface.</p><h4>Encapsulation</h4><p>In Java, encapsulation refers to the practice of combining data (variables) and the code that affects them (methods) into a single unit. The variables of a class are protected by an encapsulation so that only the methods of the class can access them. Getters ans Setters methods are used to get the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*Nf35dXk73ksnpgqjfWt3zw.jpeg" /><figcaption>Encapsulation</figcaption></figure><p>So, this is all a brief about OOPS Concepts in Java. It’s not yet done we still need to learn on how Inheritance, Polymorphism , Abstraction and Encapsulation is implemented and how many ways to achieve them and many more in-depth concepts.</p><p>I hope you like this blog, comment below your suggestions / feedback / concerns if any🙌</p><p>In the coming blog we will learn implementations of each OOPS Principle with a coding example. Till then keep learning and keep coding✌️</p><p>Thanks,</p><p><a href="https://medium.com/u/ebf164f663df">Sowjanya Sunkavalli</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f693f172f0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Structure of Java Program ]]></title>
            <link>https://medium.com/@sunkavallisowjanya/structure-of-java-program-60b6e9a237c7?source=rss-ebf164f663df------2</link>
            <guid isPermaLink="false">https://medium.com/p/60b6e9a237c7</guid>
            <category><![CDATA[core-java]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Sowjanya Sunkavalli]]></dc:creator>
            <pubDate>Thu, 25 Aug 2022 23:57:12 GMT</pubDate>
            <atom:updated>2022-08-25T23:57:12.380Z</atom:updated>
            <content:encoded><![CDATA[<h4>BASICS OF JAVA</h4><p>Hello everyone, 🙌</p><p>Hope you are doing great and rocking in learning each day✌️✌️</p><p>Okay let’s jump into the next concept, so what’s in this blog?? In the previous blogs we have learnt about Java Components, and Java Program Execution etc., So, in this blog, we will learn about the complete Structure of the Java Program.</p><p>So, A Java Program has the following Structure with the below components,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*36nV49z_MCPMU-S04JiwIw.png" /><figcaption>Java Program Structure Sections</figcaption></figure><p>· Documentation Section</p><p>· Package Statement</p><p>· Import Statement</p><p>· Interface Section</p><p>· Class Definition</p><p>· Main Method Class</p><p>So, let’s deep dive into each of the components.</p><p>The below figure clearly shows each section in Java Program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*IDA-ahOFUE1YibNqHPdWMQ.png" /><figcaption>Java Program Structure</figcaption></figure><h4><strong><em>Documentation</em></strong></h4><p>For a Java program, the documentation part is a crucial but optional section. <strong>It contains fundamental details about a Java program. The name of the author, creation date, version, program name, firm name, and description of the program are all included in the data. It makes the software code easier to read. </strong>Whatever we put in the <strong>documentation section is ignored by the Java compiler when the program is running.</strong></p><p>Comments can be two types, Single line comments and Multi-line Comments.</p><p><strong>// Author Name</strong></p><p><strong>/* This Code contains various modules.</strong></p><p><strong>Module 1 is for ABC…etc., */</strong></p><h4><strong>Import Statements</strong></h4><p>Various predefined classes and interfaces are included in the package. Any class that belongs to a certain package that we want to use must be imported. <strong>A class that is kept in another package is represented by the import statement.</strong> To import the class, we use the keyword import. Both the class declaration and the package statement come before it in the writing.</p><p><strong>import java.util.*;</strong></p><p><strong>import java.lang.Object;</strong></p><h4><strong>Interface</strong></h4><p>If necessary, we can build an interface in this part. To create an interface, we utilize the interface keyword. <strong>A class and an interface differ slightly from one another. It just has declarations for methods and constants. It cannot be instantiated, which is another distinction.</strong> The implements keyword lets us use interface in classes. By utilizing the extends keyword, an interface can also be utilized with other interfaces. This is Optional in the structure.</p><h4><strong>Class Definition</strong></h4><p>Here, we define the class. It is an essential component of a Java program. We cannot write any Java program without the class. More than one class definition may be present in a Java program. <strong>To define a class, we utilize the class keyword. The class serves as a blueprint for a Java program. It includes details on user-defined functions, variables, and constants. The main() function can be found in at least one class in every Java program.</strong></p><h4><strong>Main Method Definition</strong></h4><p>Here, we define the main() method. <strong>All Java applications require it as the main() function is where all Java applications begin to run.</strong> In other words, it serves as a starting point for the class. It must be contained within the class. We construct objects and invoke the methods inside the main method.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60b6e9a237c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What does public static void main(String [] args){}?]]></title>
            <link>https://medium.com/@sunkavallisowjanya/what-does-public-static-void-main-string-args-df5790cb037c?source=rss-ebf164f663df------2</link>
            <guid isPermaLink="false">https://medium.com/p/df5790cb037c</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Sowjanya Sunkavalli]]></dc:creator>
            <pubDate>Sat, 20 Aug 2022 23:47:42 GMT</pubDate>
            <atom:updated>2022-08-20T23:49:32.908Z</atom:updated>
            <content:encoded><![CDATA[<h4>BASICS OF JAVA</h4><h3><strong>What does public static void main(String [] args){} mean?</strong>🤔</h3><h4>A complete story</h4><p>Hello everyone, 🙌</p><p>Hope everyone is doing well and having a great time learning✌️</p><p>In the previous blog, we have seen some basics related to Java Program execution and the importance of JVM, JRE and JDK.</p><p>Once we have the basic knowledge of these terms, we must next look into the Basic Java Programming Concepts.</p><p>We all know that every Java Program have the main method which is generally written as</p><blockquote><strong>public static void main (String args []){}</strong></blockquote><p>Okay, what does each term mean in terms of Java Programming and Execution Concepts?</p><p>So, in this blog, we are going to understand these terms and the significance of each term.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/0*uzZvJPC49hqrg6Yw.png" /><figcaption><strong>public static void main (String args []){} </strong>(Source: scientecheasy<em>)</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*xoPTBFp9HNIUFkgzCJDoBw.png" /><figcaption><strong>public static void main (String args []){}</strong></figcaption></figure><p>So simply defining public is an access specifier, static is a Keyword, the void is the Return Type, main is the default method name and String args [] is the array of type string. Let&#39;s understand each term in more detail.</p><p><strong>public — </strong>It is an <strong>access specifier</strong> for the Method. Access specifiers are nothing but the keywords that set the Accessibility of the classes, methods, and other members. So, here <strong>we need to set the access specifier as public for the main method to enable access to the Run time environment so that JVM can make a call to the main method directly.</strong></p><p>If we do not specify as public for the main method Compiler will throw an error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*tCOaAmi1x2ZWLS27mcnVTQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CJVxQyV117LBjA0BbbXP8g.png" /></figure><p><strong>Static</strong>: <strong>static keyword is basically used when there is no object instance for the class,</strong> when the main method is called in run time it should be declared as static because we don’t have any object instance for the main method, if we didn’t declare as static for the main method, JVM can’t load the main method into the memory, and it throws an error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*MwiUxFX_rRJx5n1KFEGJWw.png" /></figure><p><strong>Void</strong>: Void keyword is used to identify that the method is not returning any data type. <strong>When the main program execution completes then Java Program also terminates, so if we are trying to return anything after the java program terminates it will throw a compilation error.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*-fhRxcb2lGqTyk_0ygdxKw.png" /></figure><p><strong>Main: </strong>the main method is the keyword used to identify the main method that JVM calls during the start of execution, <strong>if we didn’t provide a name as the main method, JVM can’t identify the main method to start the execution.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*h2sGjM-02RnYepm6bm4RVA.png" /></figure><p><strong>String [] args: </strong>args is an array of type String. <strong>Java&#39;s main method accepts the command line arguments of string data type.</strong> We can pass command line arguments from Java Run configurations at the run time.</p><p><strong>So here as args is just the identifier for the arguments we can keep not only args but also any other identifier like an ABC, any name, test etc.,</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*5HbFAXqjlNdb7fSCZ5kADA.png" /></figure><p>So, this is all about <strong>public static void main (String [] args). </strong>I hope you get the basic idea of this concept.</p><p>In the coming blog, we will learn more about the <strong>Java Program structure</strong> and the basics of <strong>OOPS</strong> Concepts.</p><p>Happy learning✌️</p><p><a href="https://medium.com/u/ebf164f663df">Sowjanya Sunkavalli</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df5790cb037c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is JVM, JRE and JDK]]></title>
            <link>https://medium.com/@sunkavallisowjanya/what-is-jvm-jre-and-jdk-a4747748be19?source=rss-ebf164f663df------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4747748be19</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[jdk]]></category>
            <category><![CDATA[jvm]]></category>
            <category><![CDATA[jre]]></category>
            <category><![CDATA[jvm-architecture]]></category>
            <dc:creator><![CDATA[Sowjanya Sunkavalli]]></dc:creator>
            <pubDate>Sun, 07 Aug 2022 22:54:11 GMT</pubDate>
            <atom:updated>2022-08-07T22:54:11.485Z</atom:updated>
            <content:encoded><![CDATA[<h4>BASICS OF JAVA</h4><h4>Brief on Java Core Components</h4><p>Hello everyone…🙌</p><p>Hope you guys are doing great with your learning!!!</p><p>So, in this blog lets briefly look into story of so-called Main Components of Java Programming <strong><em>JVM, JRE and JDK</em></strong> as discussed in my First Story.</p><p>If you have not read my Previous story yet why are you waiting, check it out, you will get the brief idea on How Java program is executed in a very precise way.</p><p>So, what are these terms JVM, JRE and JDK, well everyone knows this as below</p><p><em>JVM — Java Virtual Machine</em></p><p><em>JRE — Java Runtime Environment</em></p><p><em>JDK — Java Development Kit</em></p><p>To execute/run any Java based Application or Program we need the Help our above JVM, JRE and JDK components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*rs1yck-oJpImlzuBLg6jJg.png" /><figcaption>JDK, JRE and JVM</figcaption></figure><p>From the above figure we can represent JVM, JRE and JDK Mathematically as follows</p><blockquote>JDK = JRE + JVM + Development Tools</blockquote><blockquote>JRE = JVM + Library Classes</blockquote><p>So, ultimately JVM is one Component on which the entire Flow of Java Program Execution is done combined with required libraries and Development Tools.</p><p>Now, lets understand the Working model / architecture of JVM, Here goes.</p><h4><strong>What is JVM?</strong></h4><p>We called it as Java Virtual Machine, but ever wondered why it is called Virtual Machine🤔</p><p>JVM is Virtual Machine because it is a Software Implementation of Physical device i.e., whenever we write Java Program which is called WORO (Write Once and Run Anywhere), .java file is converted to .class file and finally which is given to VM i.e., our JVM to implement and produce the Output. This JVM is Platform Dependent i.e., for every OS we have specific JVM, but Java is called Platform Independent Language, do you know why?</p><p>Yes, it is because the Byte Code Produced from Compiler is Platform Independent which makes Java termed as Platform Independent.</p><p>So, what happens inside our Masterpiece JVM, for that we should have a sneak peek into JVM Architecture.</p><h4><strong>Architecture of JVM</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VYugEHhl8p_WucQ_p-epTQ.png" /><figcaption>JVM Architecture</figcaption></figure><p>JVM Consists of Three Main Categories, namely</p><blockquote>Class Loader, JVM Memory and Execution Engine.</blockquote><p><strong>Class Loader</strong> — Class Loader is used to Load the Class File and save the Corresponding Byte Code in the Memory area.</p><p><strong>JVM Memory</strong> — All the Memory management of the Java Program is done here.</p><p><strong>Method Area</strong> — It will hold the class level information of all the classes in the Code. This component is shared by all the Classes.</p><p><strong>Heap</strong> — We know that JVM creates the Class Object for each class file, this Objects are stored in the Heap Memory.</p><p><strong>Stack</strong> — This is also kind of Memory storage component, but it will store all the temporary variables in the Code.</p><p><strong>PC Registers</strong> — This component keeps track of which Instruction is being executed and which Instruction is going to be executed next.</p><p><strong>Native Method Stack</strong> — It holds the information of the Native Methods, for every thread there is separate Native Method Stack will be created.</p><p><strong>Execution Engine</strong> — It contains Interpreter and JIT Compiler which executes the Byte code and Produces the Machine-Readable Code which will finally sent to OS to execute and Produce Output according to the Logic Given.</p><p>Execution Engine also Contains <strong><em>Garbage Collector</em></strong> which removes the unreferenced Objects created by JVM.</p><p><strong>Native Method Libraries</strong> — This component contains all the required libraries for the Program to be executed.</p><p><strong>Native Method Interface</strong> — This component also Called as Java Native Interface (JNI), which interacts with the Native Libraries and Provides them to the Execution Engine.</p><p>There is a lot about JVM, JRE and JDK, So Let us conclude it in a nutshell.</p><p><strong>JDK </strong>— Will have all the Required Development Tools, Java Doc etc., so when we write a Program, and Execute It will reach to JVM via JRE.</p><p><strong>JDK Responsibilities </strong>— Providing Java Compiler, Debugger and Other Development Tools.</p><p><strong>JRE Responsibilities</strong> — Comprises of JVM which Provides required libraries for the Java Program Execution.</p><p><strong>JVM Responsibilities</strong> — Load class file →Memory Management →Execution of Program</p><p>So, this is all about JVM, JRE and JDK, I hope you guys liked it.</p><p>In the next story I will come up with brief idea on the Basics of Java Program Syntax.</p><p>Happy Learning everyone🙌</p><p><a href="https://medium.com/u/ebf164f663df">Sowjanya Sunkavalli</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4747748be19" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a Java Program is Executed? Role of JVM , JRE, and JDK..]]></title>
            <link>https://medium.com/@sunkavallisowjanya/how-a-java-program-is-executed-role-of-jvm-jre-and-jdk-480bb47128e1?source=rss-ebf164f663df------2</link>
            <guid isPermaLink="false">https://medium.com/p/480bb47128e1</guid>
            <category><![CDATA[jdk]]></category>
            <category><![CDATA[jre]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[jvm]]></category>
            <dc:creator><![CDATA[Sowjanya Sunkavalli]]></dc:creator>
            <pubDate>Wed, 03 Aug 2022 03:41:32 GMT</pubDate>
            <atom:updated>2022-08-03T03:41:32.786Z</atom:updated>
            <content:encoded><![CDATA[<h4>Basics of Java</h4><h3>How a Java Program is Executed? Role of JVM , JRE, and JDK..🤔</h3><h3>Execution of a Java Program</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*qQDHWG33fU2RQPNqd90unQ.jpeg" /><figcaption>Java Program Execution (Source: simplesnippets)</figcaption></figure><p>Hello everyone, Welcome to my first blog🙌</p><p>I am a Software Developer Engineer in Test with experience in the Automation of Web, API, and Mobile applications with different tech stacks like Java, Python, Selenium, API, JMeter, etc.</p><p>I am passionate about briefly sharing my knowledge in bits and pieces on different concepts from the basics.</p><p>In this article let’s together know briefly how a java program is executed starting from Compilation, Interpretation, and getting the output according to the Program Logic.</p><p>We know that Java Program is a high-level language (human-readable) written either in simple notepad or IDE (Integrated Development Environment) like Eclipse, or IntelliJ.</p><p>After writing the Program next step is to compile the Program to check any compilation Errors, again here compilation is done in two ways we can use the <em>javac</em> command through CLI (Command Line Interface) or Click on the <em>Run</em> option in the IDE.</p><p>This operation invokes the Compiler which takes the <em>.java</em> file and converts it into a <em>.class</em> file if there are no errors otherwise it will throw Compilation Time errors.</p><p>The .class file is loaded to the JVM by the class loader and then it will pass through a gatekeeper Bytecode Verifier since the bytecode verifier checks for the code whether it is safe to pass it to the Interpreter.</p><p>Once code is processed to the Interpreter it executes line by line and generates Machine code that is understandable by Computer, again here JIT(Just-In-Time) comes into the picture at the runtime to make the program execution faster.</p><p>The generated Machine code is given as an input to the specific OS which runs and finally gives the Output on the console or any application GUI.</p><p>Yeah, there is a lot to read, let’s summarize it in a nutshell</p><p><strong>Summary:</strong></p><blockquote><strong><em>Human readable Java Program (.java file) → compiler (triggered by Run button in IDE or javac command in CLI) → Intermediate Byte Code (.class file) → Loaded to JVM by Class loader → Byte code is verified by Bytecode Verifier to check the compatibility with Interpreter →JIT to make the Code exection faster by ignoring redundant code → Interpreter converts the bytecode to Machine readable code → Machine code is sent to OS to execute → Output on Console</em></strong></blockquote><p>So, we have seen how the code is executed finally but what is the role of JVM, JRE, and JDK in the flow, let’s see</p><h3>Role of JVM , JRE and JDK</h3><figure><img alt="JVM , JRE and JDK" src="https://cdn-images-1.medium.com/max/1024/1*LuKOZMDCX8e1zDyGyMUu_w.png" /><figcaption>JVM , JRE and JDK(Source:JavaCodeMonk)</figcaption></figure><p><strong>JVM: </strong>Java Virtual Machine loads the byte code, verifies it, and executes the code. It is specific to every operating system, but why java code is called to Write Once and Run Anywhere (WORA) because the byte code I. e .class file is compatible with running all OS with specific JVM.</p><p><strong>JRE: </strong>Java Program needs to associate with required libraries to execute the program and guess what these libraries are part of JRE (Java Run Time Environment) which includes ClassLoader, Byte Code verifier, and many other libraries.</p><p><strong>JDK: </strong>Java Development Kit,<strong> </strong>so we have written a java program but who is going to compile that and debug the code if we have errors in the code and the Javadoc for the methods and classes, so all these are embedded in the Java Development Kit.</p><p>So, this is a little about the Java Program execution and the role of JVM, JRE, and JDK I hope you guys liked it.</p><p>In the coming blogs, I will be writing in detail on JVM, JRE, and JDK. Watch this space for Basics of Java Programming and also Test Automation.</p><p>Happy Learning🙌</p><p><a href="https://medium.com/u/ebf164f663df">Sowjanya Sunkavalli</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=480bb47128e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>