ru
Feedback

Не попадитесь на канал ботавода! Telemetrio находит и помечает такие каналы 👉 Хотите видеть метку — оформите подписку

JAVA PROGRAMMING

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! 😊

Больше
4 927
Подписчики
-224 часа
-207 дней
-6030 дней
Архив постов
Data structures short notes
+8
Data structures short notes

//#6 2 Number Adder(Calculator) from user input
// This for Scan anything entered by user (user inputs)
import java.util.Scanner;

class myClass {
    public static void main(String[] args) {
        
        int x,y,Sum;
        
        Scanner s = new Scanner(System.in);
        // it will take input from keyboard
        
        System.out.println("Enter 1st Number: ");
        x = s.nextInt(); // scanning 
        
        System.out.println("Enter 2nd Number: ");
        y = s.nextInt(); // scanning
        
        Sum = x+y;
        System.out.println("Sum = "+ Sum);
    }
}

// #5 Atithmetic Operations in Java
public class MyClass {
  public static void main(String args[]) {
     
     // declaring variables 
     int add, sub, div, mul, rem;
     
     // Declaring two varables
     int x=4;
     int y=2;
     
     // performing Operations
     add = x+y;    // Addition 
     sub = x-y;     // Subtraction
     div = x/y;      // Division
     mul = x+y;     // Multiply 
     rem= x%y;     // reminder
     
     // Showing results
     System.out.println("4 + 2 = "+ add);
     System.out.println("4 - 2 = "+ sub);
     System.out.println("4 * 2 = "+ mul);
     System.out.println("4 / 2 = "+ div);
     System.out.println("4 % 2 = "+ rem);
  }
}

🔰 join ᴏᴜʀ ᴀʟʟ ᴄʜᴀɴɴᴇʟs for coding 🔰 ᴛᴇʀᴍᴜx ʜᴀᴄᴋɪɴɢ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴛᴇʀᴍᴜx ᴄᴏᴍᴍᴀɴᴅ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴛᴇʀᴍᴜx ᴛʀɪᴄᴋs ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴘʜᴘ ʟᴀɴɢᴜᴀɢᴇs ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴄ ᴘʀᴏɢʀᴀᴍᴍɪɴɢ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴄ++ ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴄ# ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴊᴀᴠᴀ ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴄss ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴘʏᴛʜᴏɴ ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴛʏᴘᴇsᴄʀɪᴘᴛ ᴄʟɪᴄᴋ ʜᴇʀᴇ ᴊᴀᴠᴀsᴄʀɪᴘᴛ ᴄʟɪᴄᴋ ʜᴇʀᴇ ʜᴛᴍʟ ʟᴀɴɢᴜᴀɢᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ

//#4 Declaring & iniitializing Array
public class MyClass {
  public static void main(String args[]) {
     
     int arr[]; //declaring array
     arr = new int[20]; // allocating memory
  
     arr[0]= 55; //iniitializing first element
     arr[1]= 33; //initi.... 2nd Element
     System.out.println(arr[0]);
  }
}

//#4 Declaring & iniitializing Array
public class MyClass {
  public static void main(String args[]) {
     
     int arr[]; //declaring array
     arr = new int[20]; // allocating memory
  
     arr[0]= 55; //iniitializing first element
     arr[1]= 33; //initi.... 2nd Element
     System.out.println(arr[0]);
  }
}

Subscribe our channel for termux hacking,python animation,coding,html ,telegram bot tips & trick related - 👉 https://youtube.com/@CODEBOMBS Subscribe our channel for termux hacking, designing, tips & trick, bot making related - 👉 https://youtube.com/@TECHINDNN

Kya abhi bhi Google pe hi search krte ho 😒 Smart bniye use kijiye hmara Chatgpt telegram bot 👉 @imabhiAI_bot ✅ unlimited message ✅ 24×7 Support ✅ support all languages ✅ translation features ✅ quick response ✅ easy to use Our other bot you can try Compiler bot advance - @IOCompiler_bot Code compiler - @Cmpbbot Compiler pro - @CodeCompiler_Bot Solve maths - @mathsrobot Group/channel manage - @Myhurthearts_bot

Program with use of switch case to find a months public class Example{ public static void main(String args[]){ int month= 7; switch(month){ case 1 : System.out.println("january"); break; case 2: System.out.println("february"); break; case 3: System.out.println("march"); break; case 4: System.out.println("april"); break; case 5: System.out.println("may"); break; case 6: System.out.println("june"); break; case 7: System.out.println("july"); break; case 8: System.out.println("august"); break; case 9: System.out.println("september"); break; case 10: System.out.println("October"); break; case 11: System.out.println("november"); break; case 12: System.out.println("december"); break; default: System.out.println("not valid"); } } } Output: july

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); } } }

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

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 #basicprograms

Program to print hello world in java public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }

------------------------------ 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