This repository contains projects and code written in Java, a powerful and versatile programming language used for building a wide range of applications, from mobile to enterprise-level software. Java's platform independence, object-oriented structure, and strong community support make it an excellent choice for modern software development. It offers a robust ecosystem with extensive libraries, frameworks, and tools that help streamline the development process.
The file name and class name should be the same, including case sensitivity, to compile with javac
and run with java
.
Compile .java file
javac HelloWorld.java
Run .class file
java HelloWorld
Gradle Initial Program
gradle init
Gradle build.gradle
plugins {
id 'java'
id 'application'
}
// Main class without a package name
mainClassName = 'Main'
Gradle Build
gradle build
Gradle Run
gradle run