<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Abinaya</title>
    <description>The latest articles on Forem by Abinaya (@abinaya_ecf4e73cb66304c37).</description>
    <link>https://forem.com/abinaya_ecf4e73cb66304c37</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3486025%2Fe9d8a400-24fe-4682-b5fd-8967c0fd902c.jpg</url>
      <title>Forem: Abinaya</title>
      <link>https://forem.com/abinaya_ecf4e73cb66304c37</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/abinaya_ecf4e73cb66304c37"/>
    <language>en</language>
    <item>
      <title>My Third Step in Java: Methods, Main Method, Objects, and a Mini Calculator</title>
      <dc:creator>Abinaya</dc:creator>
      <pubDate>Sat, 20 Sep 2025 09:33:28 +0000</pubDate>
      <link>https://forem.com/abinaya_ecf4e73cb66304c37/my-third-step-in-java-methods-main-method-objects-and-a-mini-calculator-38i0</link>
      <guid>https://forem.com/abinaya_ecf4e73cb66304c37/my-third-step-in-java-methods-main-method-objects-and-a-mini-calculator-38i0</guid>
      <description>&lt;p&gt;I recently started learning Java, and in my first few sessions we covered some of the most important basics. In this post, I want to walk through what I learned: methods, the main method, objects, how to call methods, and even building a small calculator program.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Methods in Java&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Methods are blocks of code that perform a specific task. They make code reusable, organized, and easier to read.&lt;/p&gt;

&lt;p&gt;We looked at four different types of methods:&lt;/p&gt;

&lt;p&gt;1.With return type, without arguments&lt;/p&gt;

&lt;p&gt;2.With return type, with arguments&lt;/p&gt;

&lt;p&gt;3.Without return type, with arguments&lt;/p&gt;

&lt;p&gt;4.Without return type, without arguments&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Example&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Mathematics {

//With return type, with arguments

    public int addition (int a, int b) {
    return a+b;
    }


//Without return type, with arguments

    public void int subtraction (int a, int b){ 
   }

//Without return type , without arguments

    public void String print() {
    System.out.println(" Hello Everyone");
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Main Method&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every Java program starts with the main method. It is the entry point for the program, and without it the code will not run.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static void main(String[] args) {
    // program execution begins here
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Objects in Java&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Objects are instances of a class. Using objects, we can access the methods and variables defined inside a class.&lt;/p&gt;

&lt;p&gt;Syntax:&lt;/p&gt;

&lt;p&gt;ClassName obj name = new ClassName();&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Calling Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once a method is defined, we can call it using an object of the class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static void main (string[] args){

  Mathematics arithmetics = new Mathematics();

    System.out.println(arithmetics.addition(46,87));
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Naming Conventions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We also learned about common naming conventions in Java:&lt;/p&gt;

&lt;p&gt;PascalCase -&amp;gt; CalculatorProgram&lt;/p&gt;

&lt;p&gt;camelCase -&amp;gt; simpleCalculator ( used for naming objects,methods etc...)&lt;/p&gt;

&lt;p&gt;snake_case -&amp;gt; simple_calculator (lower), &lt;/p&gt;

&lt;p&gt;upper snake case  -&amp;gt; SIMPLE_CALCULATOR (upper)&lt;/p&gt;

&lt;p&gt;lowercase -&amp;gt; simple&lt;/p&gt;

&lt;p&gt;Consistent naming makes the code easier to read and maintain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I learned&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In these sessions, I was able to understand:&lt;/p&gt;

&lt;p&gt;-Different types of methods&lt;/p&gt;

&lt;p&gt;-The role of the main method&lt;/p&gt;

&lt;p&gt;-How objects work&lt;/p&gt;

&lt;p&gt;-How to call methods&lt;/p&gt;

&lt;p&gt;-Writing a simple calculator program&lt;/p&gt;

&lt;p&gt;-Basic naming conventions&lt;/p&gt;

&lt;p&gt;Learning Java step by step makes the language feel less intimidating, and building small programs like the calculator is a great way to practice.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>java</category>
      <category>beginners</category>
      <category>coding</category>
    </item>
    <item>
      <title>My Java Learning Blog - Introduction to classes, variables and methods</title>
      <dc:creator>Abinaya</dc:creator>
      <pubDate>Mon, 08 Sep 2025 17:05:26 +0000</pubDate>
      <link>https://forem.com/abinaya_ecf4e73cb66304c37/my-java-learning-blog-introduction-to-classes-variables-and-methods-3cbg</link>
      <guid>https://forem.com/abinaya_ecf4e73cb66304c37/my-java-learning-blog-introduction-to-classes-variables-and-methods-3cbg</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In today’s session, we continued our journey with Java programming and started working with Eclipse IDE to organize and write our code. This was my first experience in creating a proper project structure in Eclipse, and it helped me understand how Java programs are built step by step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What We Learned&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Classes:&lt;br&gt;
A class in Java acts as a blueprint for creating objects. It defines the structure of a program by containing both variables and methods. Every Java program begins with at least one class.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Variables and Their Types:&lt;br&gt;
Variables are named storage containers used to hold data. We learned about several types:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;int – for whole numbers&lt;br&gt;
double – for decimal numbers&lt;br&gt;
char – for single characters&lt;br&gt;
boolean – for values that are either true or false&lt;br&gt;
String – for text&lt;/p&gt;

&lt;p&gt;There are also two important categories of variables in Java:&lt;/p&gt;

&lt;p&gt;Instance Variable: Declared inside a class but outside any method. Its value is unique for each object.&lt;/p&gt;

&lt;p&gt;Local Variable: Declared inside a method and can only be used within that method.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Student&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Instance variable&lt;/span&gt;
    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"John"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; 

    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;studentdetails&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// Local variable&lt;/span&gt;
        &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;  
    &lt;span class="o"&gt;}&lt;/span&gt;
 &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Methods and Their Types&lt;/em&gt;:&lt;br&gt;
Method is a block of code which executes a specific task.&lt;br&gt;
Types of methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Methods with return type: Return a specific value.&lt;/li&gt;
&lt;li&gt;  Methods without return type: Declared with void keyword and return nothing.&lt;/li&gt;
&lt;li&gt;  Methods with arguments: Accept inputs.&lt;/li&gt;
&lt;li&gt;  Methods without arguments: Do not take any inputs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Practical Work in Eclipse&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;During the practical session, we created a new project in Eclipse. Inside the src folder, we added a new package to organize our work. Then, within the package, we created a new class that contained the method. This allowed us to test simple programs and get familiar with Eclipse’s project structure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This session gave me a clear understanding of how classes, variables, and methods come together to form the foundation of Java programming. I am looking forward to exploring more features of Java and building more complex programs in the future.&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
    <item>
      <title>Exploring Java: From Coffee to Code ☕💻</title>
      <dc:creator>Abinaya</dc:creator>
      <pubDate>Mon, 08 Sep 2025 09:00:20 +0000</pubDate>
      <link>https://forem.com/abinaya_ecf4e73cb66304c37/exploring-java-from-coffee-to-code-1e3e</link>
      <guid>https://forem.com/abinaya_ecf4e73cb66304c37/exploring-java-from-coffee-to-code-1e3e</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;When I first heard the word Java, I honestly thought it was just about coffee. But soon I realized it’s one of the most powerful programming languages out there. While learning in class and doing a bit of research on my own, I found some quirky and interesting facts about Java that I thought were worth sharing here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Story Behind the Name&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Originally, Java was called Oak. Later, the creators renamed it “Java” after their favorite coffee from Java Island in Indonesia. So yes, the name really does have a coffee connection. That's why it the symbol kind of looks like a coffee cup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java Everywhere&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;From the apps on your Android phone to large banking systems, Java is literally everywhere. Its motto “Write Once, Run Anywhere” makes sense because the same code can run on different platforms without changing it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Object-Oriented at Heart&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Java is an object-oriented language, which basically means it organizes everything around “objects” like real world things. This makes the code easier to reuse, extend, and maintain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minecraft&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;The popular game Minecraft was built using Java! That shows how versatile it is. And while Java is not the absolute fastest language, it uses something called the JIT (Just-In-Time) compiler, which helps speed things up by translating code into machine language right when the program is running.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Object oriented programming&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Java has some powerful features: it’s object-oriented, secure, multi-threaded, robust, dynamic, architecturally neutral, portable, and high performing with efficient memory management. That’s why it has stayed relevant for decades.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thoughts&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Even though I’ve just started learning Java, researching about it has made me realize how much impact it has on the tech world. From mobile apps to huge enterprise systems, Java still plays a huge role. Excited to keep learning and sharing more along the way.&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
