<?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: V I N O T H</title>
    <description>The latest articles on Forem by V I N O T H (@vinoth_124).</description>
    <link>https://forem.com/vinoth_124</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%2F2499317%2Fe45605f3-672f-4825-912e-558792a8706e.jpg</url>
      <title>Forem: V I N O T H</title>
      <link>https://forem.com/vinoth_124</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vinoth_124"/>
    <language>en</language>
    <item>
      <title>Registration Form Application in Spring boot java</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Thu, 17 Apr 2025 12:27:40 +0000</pubDate>
      <link>https://forem.com/vinoth_124/registration-from-application-in-spring-boot-java-3a27</link>
      <guid>https://forem.com/vinoth_124/registration-from-application-in-spring-boot-java-3a27</guid>
      <description>&lt;p&gt;*&lt;em&gt;Registration From Application *&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.controller&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.demo;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class Regn_controller {

    @GetMapping("/")
    public String display(Model model)
    {
    model.addAttribute("genders", List.of("Male","Female","Other"));
    model.addAttribute("countries", List.of("Japan","U.S","Londan"));
    model.addAttribute("hobbies", List.of("Football","Cricket","GYM"));
        return "register"; 
    }

    @PostMapping("registered")
    public String getDetails(@RequestParam String username,
            @RequestParam String gene,
            Model model)
    {
        model.addAttribute("name", username);
        model.addAttribute("gend", gene);
        return "success"; 
    }
}   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2.Register.html&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html xmlns:th="http://www.thymeleaf.org"&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt; Registration Form&amp;lt;/title&amp;gt;

    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;form action="registered" method="post"&amp;gt;
        &amp;lt;label&amp;gt; Name: &amp;lt;/label&amp;gt; 
        &amp;lt;input type="text" name="username" placeholder="Enter Your Name" required&amp;gt;
        &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
        &amp;lt;label&amp;gt; Gender: &amp;lt;/label&amp;gt;
        &amp;lt;input type="radio" name="gene"
         th:each="gender:${genders}" th:value="${gender}" th:text="${gender}"&amp;gt;
        &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
        &amp;lt;label&amp;gt; Country: &amp;lt;/label&amp;gt;
        &amp;lt;select name="nation"&amp;gt;
&amp;lt;option th:each="country:${countries}" th:value="${country}" 
th:text="${country}"&amp;gt;

            &amp;lt;/option&amp;gt;
        &amp;lt;/select&amp;gt;
        &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
        &amp;lt;label&amp;gt; Hobby: &amp;lt;/label&amp;gt;

        &amp;lt;input type="checkbox" name="hob" 
        th:each="hobby:${hobbies}" th:value="${hobby}" 
        th:text="${hobby}"&amp;gt;
        &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
        &amp;lt;input type="submit" value="Enter Details"&amp;gt;
        &amp;lt;/form&amp;gt;
    &amp;lt;/body&amp;gt;


&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3.Success.html&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Registered Successfully
&amp;lt;p th:text="${name}"&amp;gt;

&amp;lt;/p&amp;gt;
&amp;lt;p th:text="${gend}"&amp;gt;

&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ysadx3sc1d2jhdsrh72.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ysadx3sc1d2jhdsrh72.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gxzm6d5s0i8xrvquo3k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7gxzm6d5s0i8xrvquo3k.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>springboot</category>
      <category>java</category>
      <category>payliagam</category>
    </item>
    <item>
      <title>background color change using spring boot mini project</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Tue, 15 Apr 2025 17:35:10 +0000</pubDate>
      <link>https://forem.com/vinoth_124/background-color-change-using-spring-boot-mini-project-1p86</link>
      <guid>https://forem.com/vinoth_124/background-color-change-using-spring-boot-mini-project-1p86</guid>
      <description>&lt;p&gt;1) File --&amp;gt; New --&amp;gt; Spring Starter Project&lt;br&gt;
2) Name --&amp;gt; Calculator&lt;br&gt;
3) Select Maven as Type&lt;br&gt;
4) Click Next&lt;br&gt;
5) Add Dependencies: DevTools, Web, Thymeleaf&lt;br&gt;
6) Click Next, Finish&lt;br&gt;
7) Go to src/main/java --&amp;gt; Create a package called com.example.demo.controller&lt;br&gt;
8) Now, right click the newly created package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.demo.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class Color_controller {

    @GetMapping("/")
    public String change_color(@RequestParam(defaultValue = "blue") String colors, Model model)
    {
        model.addAttribute("selectedColor", colors);
        return "color"; 
    }

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html xmlns:th="http://www.thymelear.org"&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt; Color Picker &amp;lt;/title&amp;gt;
    &amp;lt;/head&amp;gt;
&amp;lt;body th:style="'background-color:' + ${selectedColor}"&amp;gt;
        &amp;lt;form action="/" method="get"&amp;gt;
            &amp;lt;input type="color" th:value='${selectedColor}' name="colors"&amp;gt;
            &amp;lt;input type="submit" value="Change Color"&amp;gt;
        &amp;lt;/form&amp;gt;

    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OUTPUT&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ioyhr3d9n9esvgw62vx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ioyhr3d9n9esvgw62vx.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>webdev</category>
      <category>springboot</category>
      <category>payliagam</category>
    </item>
    <item>
      <title>spring boot java project_Calc</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Thu, 10 Apr 2025 17:48:14 +0000</pubDate>
      <link>https://forem.com/vinoth_124/spring-boot-java-projectcalc-4efc</link>
      <guid>https://forem.com/vinoth_124/spring-boot-java-projectcalc-4efc</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             step for creating files 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;1) File --&amp;gt; New --&amp;gt; Spring Starter Project&lt;br&gt;
2) Name --&amp;gt; Calculator&lt;br&gt;
3) Select Maven as Type&lt;br&gt;
4) Click Next&lt;br&gt;
5) Add Dependencies: DevTools, Web, Thymeleaf&lt;br&gt;
6) Click Next, Finish&lt;br&gt;
7) Go to src/main/java --&amp;gt; Create a package called com.example.demo.controller&lt;br&gt;
8) Now, right click the newly created package.&lt;br&gt;
9) Create a class -&amp;gt; Calc_Controller&lt;br&gt;
10) Add @Controller annotation&lt;br&gt;
11) Add below content:&lt;br&gt;
@GetMapping("/")&lt;br&gt;
public String show_calculator()&lt;br&gt;
{&lt;br&gt;
return "calc";&lt;br&gt;
}&lt;br&gt;
12) Now, go to src/main/resources --&amp;gt; templates&lt;br&gt;
13) Create a filed named as 'calc.html'&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import org.springframework.ui.Model;

@Controller
public class calc_Controller {
    @GetMapping("/")
    public String show_calculator()
    {
        return "calc";
    }
    @PostMapping("/calculate_values")
    public String do_calculations(@RequestParam double num1,@RequestParam double num2,@RequestParam String operations, Model model)
    {
        model.addAttribute("no1", num1);
        model.addAttribute("no2", num2);
        model.addAttribute("ops", operations);
        double result = 0; 
        switch(operations)
        {
        case"+": result = num1 + num2; break;
        case"-": result = num1 - num2; break;
        case"*": result = num1 * num2; break;
        case"/": result = num1 / num2; break;
        }
        model.addAttribute("result",result);
        return "calc";
    }
}

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

&lt;/div&gt;



&lt;p&gt;14) Create Mapping for /calculate_values [action of form]&lt;/p&gt;

&lt;p&gt;@RequestParam&lt;br&gt;
Annotation which indicates that a method parameter should be bound to a web request parameter.&lt;/p&gt;

&lt;p&gt;15) Create below method in Controller:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html xmlns:th="http:www.thymeleaf.org"&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;Calculator&amp;lt;/title&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;form action="calculate_values" method="post"&amp;gt;
        &amp;lt;labal&amp;gt;Number 1: &amp;lt;/labal&amp;gt;
        &amp;lt;input type="Number"name="num1"&amp;gt; &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;
        &amp;lt;label&amp;gt;Number 2:&amp;lt;/label&amp;gt;
        &amp;lt;input type="number"name="num2"&amp;gt; &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;
        &amp;lt;select name="operations"&amp;gt;
            &amp;lt;option value="+"&amp;gt; Add&amp;lt;/option&amp;gt;
            &amp;lt;option value="-"&amp;gt; Subtract&amp;lt;/option&amp;gt;
            &amp;lt;option value="*"&amp;gt; Multiply&amp;lt;/option&amp;gt;
            &amp;lt;option value="/"&amp;gt; Divide&amp;lt;/option&amp;gt;
        &amp;lt;/select&amp;gt;
         &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;
         &amp;lt;input type="submit" value="Calculate"&amp;gt;    
         &amp;lt;/form&amp;gt;
              &amp;lt;h2&amp;gt;Result&amp;lt;/h2&amp;gt; &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;
              &amp;lt;p&amp;gt;
                &amp;lt;span th:text ="${no1}"&amp;gt;&amp;lt;/span&amp;gt;
                &amp;lt;span th:text ="${ops}"&amp;gt;&amp;lt;/span&amp;gt;
                &amp;lt;span th:text ="${no2}"&amp;gt;&amp;lt;/span&amp;gt;
                &amp;lt;span&amp;gt;=&amp;lt;/span&amp;gt;
                &amp;lt;sapn th:text="${result}"&amp;gt;&amp;lt;/sapn&amp;gt;
              &amp;lt;/p&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;output&lt;/p&gt;

&lt;p&gt;&lt;a href="http://localhost:8080/calculate_values" rel="noopener noreferrer"&gt;http://localhost:8080/calculate_values&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faxcjeabe2n0bb3q1nb42.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faxcjeabe2n0bb3q1nb42.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>springboot</category>
      <category>html</category>
      <category>payliagam</category>
    </item>
    <item>
      <title>Spring Boot,Annotation</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Thu, 03 Apr 2025 16:53:22 +0000</pubDate>
      <link>https://forem.com/vinoth_124/spring-bootannotation-hc9</link>
      <guid>https://forem.com/vinoth_124/spring-bootannotation-hc9</guid>
      <description>&lt;p&gt;1.what is Spring Boot?&lt;br&gt;
Spring Boot is a framework built on top of Spring Framework that simplifies the development of Java-based web applications and microservices. It eliminates the need for complex configurations and allows developers to quickly build and deploy applications with minimal setup.&lt;/p&gt;

&lt;p&gt;2.key points of Spring&lt;br&gt;
Spring Boot – Key Points 🚀&lt;br&gt;
✅ Built on Spring Framework – Simplifies Java web and microservices development.&lt;br&gt;
✅ Auto-configuration – Reduces manual setup, configures beans automatically.&lt;br&gt;
✅ Embedded Servers – Comes with Tomcat, Jetty, or Undertow, no need for external servers.&lt;br&gt;
✅ Spring Boot Starters – Pre-configured dependencies for faster development.&lt;br&gt;
✅ Microservices Support – Ideal for cloud-based applications.&lt;br&gt;
✅ Spring Boot Actuator – Provides monitoring, metrics, and health checks.&lt;br&gt;
✅ Production-Ready – Has logging, exception handling, and security features.&lt;br&gt;
✅ Spring Initializr – Generates a project setup quickly (start.spring.io).&lt;br&gt;
✅ Simplified Deployment – Can be packaged as a JAR and run independently.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.demo;

import org.springframework.stereotype.Component;

@Component 
public class Engine {

//  String fuel1, fuel2;
//  public Engine(String fuel1, String fuel2) 
//  {
//      this.fuel1 = fuel1;
//      this.fuel2 = fuel2;
//  }

    public void Start() {
        System.out.println("Engine Started");
    }
}

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

&lt;/div&gt;



&lt;p&gt;package com.example.demo;&lt;/p&gt;

&lt;p&gt;import org.springframework.beans.factory.annotation.Autowired;&lt;br&gt;
import org.springframework.stereotype.Component;&lt;/p&gt;

&lt;p&gt;@Component&lt;br&gt;
public class Car {&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Autowired
Engine engine;

public static void main(String[] args) {

    // Car maruti = new Car();
    // maruti.drive();
}

public void drive() {
    // TODO Auto-generated method stub
    // Engine engine = new Engine("Petrol");
    engine.Start();

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

&lt;/div&gt;
&lt;p&gt;}&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext cac= 
        SpringApplication.run(DemoApplication.class, args);
        Car Bezn = cac.getBean(Car.class);
        Bezn.drive();
    }

}

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

&lt;/div&gt;



&lt;p&gt;Output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;. ____ _ __ _ _
/\ / ' __ _ ()_ __ __ _ \ \ \ \
( ( )_ | '_ | '| | ' \/ ` | \ \ \ \
\/ _)| |)| | | | | || (| | ) ) ) )
' |__| .|| ||| |_, | / / / /
=========||==============|_/=////

:: Spring Boot :: (v3.4.4)

2025-04-03T18:18:10.927+05:30 INFO 10662 --- [demo] [ restartedMain] com.example.demo.DemoApplication : Starting DemoApplication using Java 21.0.6 with PID 10662 (/home/neelakandan/Documents/workspace-spring-tool-suite-4-4.29.1.RELEASE/demo/target/classes started by neelakandan in /home/neelakandan/Documents/workspace-spring-tool-suite-4-4.29.1.RELEASE/demo)
2025-04-03T18:18:10.930+05:30 INFO 10662 --- [demo] [ restartedMain] com.example.demo.DemoApplication : No active profile set, falling back to 1 default profile: "default"
2025-04-03T18:18:10.973+05:30 INFO 10662 --- [demo] [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2025-04-03T18:18:10.973+05:30 INFO 10662 --- [demo] [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2025-04-03T18:18:11.812+05:30 INFO 10662 --- [demo] [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
2025-04-03T18:18:11.824+05:30 INFO 10662 --- [demo] [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2025-04-03T18:18:11.824+05:30 INFO 10662 --- [demo] [ restartedMain] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.39]
2025-04-03T18:18:11.850+05:30 INFO 10662 --- [demo] [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2025-04-03T18:18:11.851+05:30 INFO 10662 --- [demo] [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 876 ms
2025-04-03T18:18:12.163+05:30 INFO 10662 --- [demo] [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2025-04-03T18:18:12.183+05:30 INFO 10662 --- [demo] [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
2025-04-03T18:18:12.192+05:30 INFO 10662 --- [demo] [ restartedMain] com.example.demo.DemoApplication : Started DemoApplication in 1.585 seconds (process running for 1.88)
Engine Started
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>spring</category>
      <category>java</category>
      <category>payilagam</category>
      <category>todaylearned</category>
    </item>
    <item>
      <title>HashSet removing duplication in java</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Wed, 02 Apr 2025 16:45:19 +0000</pubDate>
      <link>https://forem.com/vinoth_124/hashset-removing-duplication-in-java-2dc4</link>
      <guid>https://forem.com/vinoth_124/hashset-removing-duplication-in-java-2dc4</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package framework;

import java.util.HashSet;
import java.util.LinkedHashSet;

public class String_arry_list {
public static void main(String[] args) {
    String name="neelakanadan";
    LinkedHashSet al=   new LinkedHashSet();    
    for(int i=0;i&amp;lt;name.length();i++)
    {
        boolean add=al.add(name.charAt(i));
        if(add==false) 
        {
            System.out.println(name.charAt(i));
        }
    }System.out.println(al);
}
}

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

&lt;/div&gt;



&lt;p&gt;output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;e
a
n
a
a
n
[n, e, l, a, k, d]

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

&lt;/div&gt;



</description>
      <category>hashset</category>
      <category>java</category>
      <category>payilagam</category>
    </item>
    <item>
      <title>HashMap in java</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Mon, 31 Mar 2025 14:34:44 +0000</pubDate>
      <link>https://forem.com/vinoth_124/hashmap-in-java-1n3c</link>
      <guid>https://forem.com/vinoth_124/hashmap-in-java-1n3c</guid>
      <description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Java HashMap Example&lt;/p&gt;

&lt;p&gt;import java.util.*;&lt;br&gt;
public class HashMapExample1{&lt;br&gt;
public static void main(String args[]){&lt;br&gt;
HashMap map=new HashMap();//Creating HashMap.&lt;br&gt;
map.put(1,"Mango"); //Put elements in Map.&lt;br&gt;
map.put(2,"Apple");&lt;br&gt;
map.put(3,"Banana");&lt;br&gt;
map.put(4,"Grapes");&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.Idli, Dosai,Pongal with prices&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package framework;

import java.util.HashMap; 

public class map {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        HashMap hm = new HashMap();
        hm.put("Idli",20);//entry
        hm.put("Dosai", 30);//entry
        hm.put("Pongal", 50);//entry
        //key---&amp;gt;set
        //Values--&amp;gt;Collection
        System.out.println(hm);
    }

}

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

&lt;/div&gt;



&lt;p&gt;output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{Dosai=30, Idli=20, Pongal=50}

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Idli,Dosai,Pongal without prices
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package framework;

import java.util.HashMap;
import java.util.Set; 

public class map {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        HashMap hm = new HashMap();
        hm.put("Idli",20);//entry
        hm.put("Dosai", 30);//entry
        hm.put("pongal", 50);//entry
        //key---&amp;gt;set
        //Values--&amp;gt;Collection
//      System.out.println(hm);
        Set s = hm.keySet(); 
        System.out.println(s);
    }

}

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

&lt;/div&gt;



&lt;p&gt;output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Dosai, Idli, Pongal]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>hashmap</category>
      <category>java</category>
      <category>payilagam</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>treeset in java</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Mon, 31 Mar 2025 13:36:23 +0000</pubDate>
      <link>https://forem.com/vinoth_124/treeset-in-java-42j4</link>
      <guid>https://forem.com/vinoth_124/treeset-in-java-42j4</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package framework;

import java.util.TreeSet;

public class treeset {
    public static void main(String[] args) {

        String name = "amalareegan";
                TreeSet hs = new TreeSet();
                hs.add(50);
                hs.add(10);
                hs.add(20);
                hs.add(30);
                System.out.println(hs);
        }
    }

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

&lt;/div&gt;



&lt;p&gt;output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[10, 20, 30, 50]

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

&lt;/div&gt;



</description>
      <category>java</category>
      <category>framework</category>
      <category>payilagam</category>
    </item>
    <item>
      <title>While loop task</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Tue, 04 Feb 2025 16:19:37 +0000</pubDate>
      <link>https://forem.com/vinoth_124/while-loop-task-4n3</link>
      <guid>https://forem.com/vinoth_124/while-loop-task-4n3</guid>
      <description>&lt;p&gt;Key words in While loop:&lt;/p&gt;

&lt;p&gt;In a while loop, the key Java keywords and concepts used are:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;while – This keyword is used to start a while loop. It repeatedly executes a block of code as long as the given condition is true.
Loop Condition – The condition inside the parentheses (no1 &amp;lt; 10) determines if the loop should continue or stop.
Loop Body – The block of code inside {} runs repeatedly while the condition is true.
Loop Control Variable – A variable (no1 in your case) that changes inside the loop to eventually break the loop.
Increment/Decrement Statement – no1++ increases the loop variable to prevent an infinite loop.
Break Condition (Implicit) – The loop stops when the condition (no1 &amp;lt; 10) becomes false.
System.out.println – Used inside the loop to print output during each iteration.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Task 1:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package loopingDemo;

public class First_Looping {

    public static void main(String[] args) {
//       TODO Auto-generated method stub
        int total=0;
        int no1=0;
        int no2=3;
        while(no1&amp;lt;10) {
            no1=no1+1;      
            total=no1*no2;
            System.out.println(no1+"*"+no2+"="+total); 
        }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1*3=3
2*3=6
3*3=9
4*3=12
5*3=15
6*3=18
7*3=21
8*3=24
9*3=27
10*3=30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Task 2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package loopingDemo;

public class First_Looping {

    public static void main(String[] args) {
int count=1;
        while(count&amp;lt;=5) {

            System.out.println("12345");
            count++;
        }       
}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;12345
12345
12345
12345
12345
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>payilagam</category>
      <category>whileloop</category>
      <category>task</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Control flow statement:</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Wed, 29 Jan 2025 07:52:22 +0000</pubDate>
      <link>https://forem.com/vinoth_124/control-flow-statemet-3de0</link>
      <guid>https://forem.com/vinoth_124/control-flow-statemet-3de0</guid>
      <description>&lt;p&gt;while task.1&lt;/p&gt;

&lt;p&gt;A while loop in Java executes a block of code repeatedly as long as the given condition remains true.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package Mistak;

public class Ifcount {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
            int count=1;
            while(count&amp;lt;=5) {
                System.out.println(1);
                count=count+1;
            }
            }
                                    //ANS = 1 1 1 1 1
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TASK 2&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package Mistak;

public class Countwhile {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int count=5;
        while(count&amp;gt;=1) {
            System.out.println(count); 
            count=count-1;
        }
        // ANS = 5 4 3 2 1

    }

}

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

&lt;/div&gt;



&lt;p&gt;TASK 3.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package Mistak;

public class While {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int count=1;
        while(count&amp;lt;=10) {
            System.out.println(count);
            count=count+2;
        }
    }               //ANS = 1 3 5 7 9

}

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

&lt;/div&gt;



&lt;p&gt;TASK 4.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package Mistak;

public class Countwhile {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        int count=5;
        while(count&amp;gt;=1) {
            System.out.println(count); 
            count=count-1;
        }
        // ANS = 5 4 3 2 1

    }

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

&lt;/div&gt;



&lt;p&gt;Key Points:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The loop executes as long as the condition is true.
If the condition is false at the start, the loop won't execute even once.
Ensure the loop condition eventually becomes false to avoid an infinite loop.

  Here are some key points about the while loop in Java:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Entry-Controlled Loop: The condition is checked before executing the loop body.&lt;br&gt;
Executes 0 or More Times: If the condition is false initially, the loop won't run at all.&lt;br&gt;
Condition Must Change: Ensure the condition eventually becomes false to avoid an infinite loop.&lt;br&gt;
Used for Indeterminate Iterations: Best suited when the number of iterations is unknown beforehand.&lt;br&gt;
Can be Interrupted: Use break to exit the loop prematurely and continue to skip an iteration.&lt;br&gt;
May Cause Infinite Loops: If the condition never turns false, the loop will run forever.&lt;br&gt;
Better for Waiting Scenarios: Often used when waiting for a condition to become true dynamically.&lt;/p&gt;

</description>
      <category>payilagm</category>
      <category>whileloop</category>
      <category>todayleaning</category>
    </item>
    <item>
      <title>Day 11 Encupsulation</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Wed, 18 Dec 2024 14:02:10 +0000</pubDate>
      <link>https://forem.com/vinoth_124/day-11-encupsulation-3kc4</link>
      <guid>https://forem.com/vinoth_124/day-11-encupsulation-3kc4</guid>
      <description>&lt;p&gt;Input 1: &lt;/p&gt;

&lt;p&gt;class Friend1&lt;br&gt;
{&lt;br&gt;
String name;&lt;br&gt;
long mobileNo; &lt;br&gt;
int atmPin; &lt;/p&gt;

&lt;p&gt;public Friend1(String name, long mobileNo, int atmPin)&lt;br&gt;
{&lt;br&gt;
this.name = name; &lt;br&gt;
this.mobileNo = mobileNo; &lt;br&gt;
this.atmPin = atmPin; &lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;public static void main(String[] args)&lt;br&gt;
{&lt;br&gt;
Friend1 f1 = new Friend1("Kavin", 1234, 1111);&lt;br&gt;
f1.withdraw();&lt;br&gt;
}&lt;br&gt;
private void withdraw()&lt;br&gt;
{&lt;br&gt;
System.out.println(atmPin);&lt;br&gt;
}&lt;br&gt;
public void tour()&lt;br&gt;
{&lt;br&gt;
System.out.println("Going for a ride");&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;public void publish_results()&lt;br&gt;
{&lt;br&gt;
System.out.println("Pass with good marks ");&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Input 2:&lt;/p&gt;

&lt;p&gt;class Friend2&lt;br&gt;
{&lt;/p&gt;

&lt;p&gt;public static void main(String[] args)&lt;br&gt;
{&lt;br&gt;
Friend1 ff = new Friend1("Arul", 3434, 2323);&lt;br&gt;
ff.tour(); &lt;br&gt;
ff.withdraw();&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkrdoc2f17pslqd3h4vti.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkrdoc2f17pslqd3h4vti.png" alt="Image description" width="800" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>payilagam</category>
      <category>encupsulation</category>
    </item>
    <item>
      <title>Day10 Task</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Tue, 17 Dec 2024 15:22:20 +0000</pubDate>
      <link>https://forem.com/vinoth_124/day10-task-58hf</link>
      <guid>https://forem.com/vinoth_124/day10-task-58hf</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Create a class Called PlayGround&lt;/li&gt;
&lt;li&gt;Create non-static variables as below. 
int score, balls, catches; 
String player_name; &lt;/li&gt;
&lt;li&gt;Create main method. &lt;/li&gt;
&lt;li&gt;Inside main method, create two instances as below. 
PlayGround player1 = new PlayGround("dhoni", 100, 3); 
PlayGround player2 = new PlayGround("jadeja", 56, 2, 30); &lt;/li&gt;
&lt;li&gt;Create appropriate constructors for handling above objects. &lt;/li&gt;
&lt;li&gt;Using player1 object, call batting() method.  Print - score, player_name. &lt;/li&gt;
&lt;li&gt;Using player2 object, call allrounder() method.  Print - score, player_name, balls, catches&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Input:&lt;/p&gt;

&lt;p&gt;class Playground &lt;br&gt;
{&lt;br&gt;
int score,balls,catches;&lt;br&gt;
String player_name;&lt;/p&gt;

&lt;p&gt;public Playground(String player_name,int score,int catches)&lt;br&gt;
{&lt;br&gt;
this.score = score;&lt;br&gt;
this.player_name = player_name;&lt;br&gt;
this.catches = catches;&lt;br&gt;
}&lt;br&gt;
public Playground(String player_name,int score,int catches,int balls)&lt;br&gt;
{&lt;br&gt;
this.score = score;&lt;br&gt;
this.player_name = player_name;&lt;br&gt;
this.balls = balls;&lt;br&gt;
this.catches = catches;&lt;br&gt;
}&lt;br&gt;
public static void main(String[] args)&lt;br&gt;
{&lt;br&gt;
Playground player1 = new Playground("dhoni",100,3);&lt;br&gt;
Playground player2 = new Playground("jadeja",56,2,30);&lt;/p&gt;

&lt;p&gt;player1.batting();&lt;br&gt;
player2.allround();&lt;br&gt;
}&lt;br&gt;
public void batting()&lt;br&gt;
{&lt;br&gt;
System.out.println(player_name+" "+score+" "+catches);&lt;br&gt;
}&lt;br&gt;
public void allround()&lt;br&gt;
{&lt;br&gt;
System.out.println(player_name+" "+score+" "+balls+" "+catches);&lt;br&gt;
}&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F893ufav7oa0lc3zif9o1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F893ufav7oa0lc3zif9o1.png" alt="Image description" width="716" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>payilagam</category>
      <category>programming</category>
    </item>
    <item>
      <title>DAY 9 Task</title>
      <dc:creator>V I N O T H</dc:creator>
      <pubDate>Mon, 16 Dec 2024 12:10:09 +0000</pubDate>
      <link>https://forem.com/vinoth_124/day-9-task-78l</link>
      <guid>https://forem.com/vinoth_124/day-9-task-78l</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Create a class 'Employee'&lt;/li&gt;
&lt;li&gt;Have main method in it. &lt;/li&gt;
&lt;li&gt;Inside main method, create an object. &lt;/li&gt;
&lt;li&gt;Using this object, call method called 'develop'. &lt;/li&gt;
&lt;li&gt;using this object, call method called 'work(10)'&lt;/li&gt;
&lt;li&gt;Define appropriate methods develop() and work(int no)&lt;/li&gt;
&lt;li&gt;From work method, return no * 10 &lt;/li&gt;
&lt;li&gt;Store the returned value as 'output' in main method. &lt;/li&gt;
&lt;li&gt;Print the 'output'. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Program:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1hi0ua23xzmyx92twze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp1hi0ua23xzmyx92twze.png" alt="Image description" width="702" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdsb6a2ugc66ih5jg1emw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdsb6a2ugc66ih5jg1emw.png" alt="Image description" width="637" height="96"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>programming</category>
      <category>payilagam</category>
    </item>
  </channel>
</rss>
