Skip to main content

Creating first program in java

It is very simple to write your first java code. Are you worried about how to do this ?. In this topic we are discussing about the basic syntax or terms used to write simple java program. You simply just follow the steps one by one as we did in our example. Don't worry if you don't understand the term used in it, Later we discuss each term on one by one.



Steps to write program


 

  • Open any text editor like Notepad,Notepad++,TextEdit etc.
  • Write the code as shown below. [ You can copy or paste it in your editor ].
  • After writing this code save it, with the name as " learningbyte.java "
  • After saving the code go to that directory wherever you saved your java file in your computer.
    [ Your file location may be different from our example, so follow your directory].
  •  

  • Note:-To run this code , open cmd prompt and type as written below !

    1) File name (cmd): javac learningbyte.java 

    2) Class name (cmd): java demo


    Comments

    Popular posts from this blog

    Get Keycloak Auth Access Token

    Understanding Keycloak Auth Access Token – A Deep Dive $ keycloak / auth-deep-dive 🔐 Identity & Access Management Getting a Keycloak Access Token — and Actually Understanding It June 2025 Keycloak OAuth 2.0 JWT OpenID Connect Service Account You hit Keycloak's token endpoint, you get back a fat JSON blob — but what is all that stuff? This post dismantles a real token response piece by piece so you know exactly what you have, why the JWT is structured the way it is, and what to do with it next. 📡 Step 1 — How to Get the Token Keycloak speaks OAuth 2.0 . The endpoint that issues tokens lives under your realm: HTTP Token Endpoint POST http://127.0.0.1:7080/realms/master/protocol/openid-connect/token Content-Type : application/x-www-form-urlencoded grant_type =client_credentials &client_id =eazybank-callcenter-cc ...

    Observability & Monitoring through Loki,Promtail (Alloy),Prometheus,Micrometer in Grafana

    🔧 What this demo covers End-to-end observability setup using Prometheus + Loki + Grafana Integration of Micrometer with Spring Boot for real-time metrics Log collection using Promtail / Alloy from application containers 📊 Metrics Monitoring (Prometheus) Scraping metrics from /actuator/prometheus endpoint JVM metrics: memory, threads, GC activity HTTP metrics: request count, latency, error rates Custom metrics via Micrometer 📜 Centralized Logging (Loki + Promtail) Aggregates logs from multiple microservices Label-based log filtering (fast & efficient) No heavy indexing → lightweight compared to ELK 📈 Visualization (Grafana Dashboards) Real-time dashboards for metrics & logs Correlate logs with metrics for faster debugging Pre-built + custom dashboards ⚙️ Architecture Flow Spring Boot app → exposes metrics via Micrometer Prometheus → scrapes & stores metrics Promtail/Alloy → collects logs → pushes to Loki...