Skip to content

A collection of introductory Java methods and console-based tasks, including prime checking, factorials, combinations, digit operations, quadratic equations, triangle area, and more. Implemented as part of a programming assignment.

Notifications You must be signed in to change notification settings

tom-vas/Java-Basics-Exercises-Application1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Java Basics – Application1

A simple Java console application containing 8 introductory programming tasks. Each task is implemented as a separate method and is tested through user input in the main() method.

πŸ“Œ Features / Tasks

Q1 – Prime Number Check
Checks whether an integer n > 1 is a prime number.

Q2 – Factorial
Computes the factorial of a number using an iterative loop.

Q3 – Combinations (n choose k)
Calculates the number of combinations using:
C(n, k) = n! / (k! * (n - k)!)

Q4 – Count Digits
Counts how many digits a positive integer contains.

Q5 – Quadratic Equation Solver
Solves axΒ² + bx + c = 0.
If the discriminant is negative, prints that no real solutions exist.

Q6 – Triangle Area (Heron's Formula)
Computes the area:
A = sqrt(s * (s - a) * (s - b) * (s - c))

Q7 – Reverse Digits
Reverses the digits of a positive integer.

Q8 – Minimum Digit
Finds the smallest digit inside a positive integer.

🧩 How to Compile & Run

Compile:
javac Application1.java

Run:
java Application1

πŸ“ File Structure

Application1.java β€” contains all 8 methods + main() for input/output.

πŸ‘€ Author

Thomas Vasilas

About

A collection of introductory Java methods and console-based tasks, including prime checking, factorials, combinations, digit operations, quadratic equations, triangle area, and more. Implemented as part of a programming assignment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages