Skip to content

CodeX-SIT/community-25-java-task1-Java-Task1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Java-Task1 — Introductory Java Exercises

This repository contains three beginner-friendly Java exercises built around the following topics:

  1. Introduction to Java + Installing Java JDK and IntelliJ IDEA for Java
  2. Basic Structure of a Java Program: Understanding our First Java Hello World Program
  3. Variables and Data Types in Java Programming
  4. Literals in Java
  5. Getting User Input in Java
  6. Operators, Types of Operators & Expressions in Java
  7. Associativity of Operators in Java
  8. Data Type of Expressions & Increment/Decrement Operators

Work to Complete

  • q1: A fill-in-the-blanks exercise focusing on basic program structure, variables, data types, and simple output.
  • q2: A complete program exercise that practices user input, operators, expressions, and basic calculations.
  • q3: A program demonstrating literals, increment/decrement operators, data type conversions, and operator associativity.

Each question lives in its own folder (q1/, q2/, q3/) and contains:

  • qX.java — the source file (either a template with "// FILL HERE" comments or a blank starter file).
  • README.md — clear instructions, expected input/output, and what to fill/implement.

How to Compile & Run (Windows)

Using Command Prompt or PowerShell:

# compile
javac q1/q1.java
javac q2/q2.java
javac q3/q3.java

# run
java -cp q1 q1
java -cp q2 q2
java -cp q3 q3

Alternative method (from each question's directory):

# For q1
cd q1
javac q1.java
java q1

# For q2
cd q2
javac q2.java
java q2

# For q3
cd q3
javac q3.java
java q3

What to Submit

  • Edit the q1/q1.java, q2/q2.java, and q3/q3.java files to implement the solutions requested in their READMEs.
  • Commit and push your changes to YOUR FORKED REPOSITORY.

Grading Hints

  • Correctness: Output must match the expected sample output in each question's README.
  • Readability: Use meaningful variable names and proper Java naming conventions.
  • Demonstration of concepts: Show that you understand:
    • Basic Java program structure
    • Variables and data types
    • Literals and their usage
    • User input with Scanner
    • Operators and expressions
    • Increment/decrement operations
    • Data type conversions

Prerequisites

  • Java JDK 8 or higher installed
  • Basic understanding of command line/terminal usage
  • Text editor (VSCode Recommended) or IDE (IntelliJ IDEA recommended)

Proceed to the q1/, q2/, and q3/ folders and complete the exercises in order.

About

community-25-java-task1-Java-Task1 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages