JAVA PROGRAMMING
Открыть в Telegram
Hello! I am @imabhi3030 and welcome to the Coding channel! Here we can learn all things related to coding and improve our skills. I am always present to help you. If you need any kind of assistance, just let me know! 😊
Больше5 008
Подписчики
Нет данных24 часа
-117 дней
+9830 день
Архив постов
5 008
here's a sample Java program that computes the factorial of a given integer using recursion:
public class FactorialExample {
public static void main(String[] args) {
int num = 5; // the number whose factorial is to be found
int factorial = calculateFactorial(num);
System.out.println("The factorial of " + num + " is " + factorial);
}
public static int calculateFactorial(int num) {
if (num == 0) {
return 1;
} else {
return num * calculateFactorial(num - 1);
}
}
}
5 008
Program to add two numbers by accepting input from the user:
----------------------------------------------------
Program:
import java.util.Scanner;
public class AddTwoNumbers {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// Prompt the user to enter the first number
System.out.print("Enter the first number: ");
int num1 = input.nextInt();
// Prompt the user to enter the second number
System.out.print("Enter the second number: ");
int num2 = input.nextInt();
// Add the two numbers
int sum = num1 + num2;
// Display the result
System.out.println("The sum of " + num1 + " and " + num2 + " is " + sum);
}
}
----------------------------------------------------
#basicprograms
5 008
Program to add two numbers
-------------------------------------------------
Program:
import java.util.Scanner;
public class AddTwoNumbers {
public static void main(String[] args) {
// Create a Scanner object to read input from the user
Scanner scanner = new Scanner(System.in);
System.out.print("Enter the first number: ");
// Read the first number from the user
double num
#basicprograms5 008
Program to print hello world in java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
5 008
------------------------------
Introducing myself :
------------------------------
I'm also a student like you studying BCA 3rd year, I started this channel to share the knowledge of C programming .
I try to gather as much programs as I can and share them with you, hoping you will support the channel by sharing this channel with your friends who are aiming to practice programs.
Channel link is here👇
https://t.me/Java_language_programming
If I make any mistakes in any program message me the mistake I had made so I'll try to correct them.
contact here 👇
@imabhi3030
Уже доступно! Исследование Telegram 2025 — ключевые инсайты года 
