ch
Feedback
Tech Jargon - Decoded

Tech Jargon - Decoded

前往频道在 Telegram

Confused by tech terms? Don’t worry, we’ve got you 🤝 We make things simple, one concept at a time. Learn daily Easy & clear Turn Confusion into clarity. #tech #it #softwareengineer #cs #development

显示更多
2 015
订阅者
-224 小时
-67
-4130
帖子存档
Reverse a Number
public class ReverseNumber {

    public static int reverse(int number) {
        int reversed = 0;
        while (number != 0) {
            int digit = number % 10;
            reversed = reversed * 10 + digit;
            number /= 10;
        }
        return reversed;
    }

    public static void main(String[] args) {
        int num = 12345;
        int reversedNum = reverse(num);
        System.out.println("Original Number: " + num);
        System.out.println("Reversed Number: " + reversedNum);
    }
}

#Java #Interview #Digits

Count Digits Without % or /
public class CountDigits {
  public static int countDigits(int number) {
    if (number == 0) {
      return 1;
    }
    int count = 0;
    int num = Math.abs(number);
    while (num > 0) {
      num = num - (int)Math.pow(10, (int)Math.log10(num));
      count++;
    }
    return count;
  }

  public static void main(String[] args) {
    System.out.println(countDigits(12345));
    System.out.println(countDigits(-123));
    System.out.println(countDigits(0));
  }
}

#Java #Swap #Interview

Swap Two Numbers Without Temp
public class SwapNumbers {
    public static void main(String[] args) {
        int a = 10;
        int b = 5;

        System.out.println("Before swap: a = " + a + ", b = " + b);

        a = a + b;
        b = a - b;
        a = a - b;

        System.out.println("After swap: a = " + a + ", b = " + b);
    }
}

Swap Two Numbers Without a Temporary Variable
public class SwapNumbers {
 public static void main(String[] args) {
 int a = 10;
 int b = 5;
 System.out.println("Before swap: a = " + a + ", b = " + b);
 a = a + b;
 b = a - b;
 a = a - b;
 System.out.println("After swap: a = " + a + ", b = " + b);
 }
}

#Java #Interview #Swap

Swap Two Numbers Without Temp
public class Swap {
 public static void main(String[] args) {
 int a = 5;
 int b = 10;
 
 a = a + b;
 b = a - b;
 a = a - b;
 
 System.out.println("a = " + a);
 System.out.println("b = " + b);
 }
}

📌 Note: To get explanations, go to @java_codes_bot and press start button. (still under development might not work in some cases) If you're facing any problem for getting explainations report it here 👉@sai7981

🔥🔥RED TAPE Lace-Up Walking Shoes 🎁 Deal Price : ₹972 Buy Here : https://ajiio.co/CTLU3k More : https://ajiio.co/q6YQfp
🔥🔥RED TAPE Lace-Up Walking Shoes 🎁 Deal Price : ₹972 Buy Here : https://ajiio.co/CTLU3k More : https://ajiio.co/q6YQfp

🔥🔥LEE COOPER Men LC20 Lightly Washed Albert Slim Straight Fit Jeans 🎁 Deal Price : ₹840 Buy Here : https://ajiio.co/7l3NyK
🔥🔥LEE COOPER Men LC20 Lightly Washed Albert Slim Straight Fit Jeans 🎁 Deal Price : ₹840 Buy Here : https://ajiio.co/7l3NyK More : https://ajiio.co/TFXYQU

🔥🔥 Roadster Men's Sweaters Starts @₹229 ➡️ Men : https://myntr.in/gxOzlt ➡️ Women : https://myntr.in/u47aWq ➡️ Sweatshirts
🔥🔥 Roadster Men's Sweaters Starts @₹229 ➡️ Men : https://myntr.in/gxOzlt ➡️ Women : https://myntr.in/u47aWq ➡️ Sweatshirts : https://myntr.in/I8Uwts

🔥🔥RED TAPE Men Colourblock Lace-Up Sneakers 🎁 Deal Price : ₹1,180 Buy Here : https://ajiio.co/nzhC27 More : https://ajiio.
🔥🔥RED TAPE Men Colourblock Lace-Up Sneakers 🎁 Deal Price : ₹1,180 Buy Here : https://ajiio.co/nzhC27 More : https://ajiio.co/ZQ9aVM

🚨 🚨 🚨 Free Course 🚨 🚨 🚨 🇺🇸 Coding Basics: Gentle Intro to Computer Programming 🌎 Language : English 👤 Publisher : ⭐ Rate : 4.0 / 122 👥 Enroll : 26,742 💵 Price : $44 -> $0 https://www.discudemy.com/coding-basics-gentle-intro-to-coding-for-beginners

🚨 🚨 🚨 Free Course 🚨 🚨 🚨 🇺🇸 Docker for Beginners: a Hands-On Practice Course (+12 hours) 🌎 Language : English 👤 Publisher : Daniel Pinheiro Maia ⭐ Rate : 4.6 / 33 👥 Enroll : 16,086 💵 Price : $109 -> $0 https://www.discudemy.com/docker-for-beginners-a-hands-on-practice-course-12-hours

🚨 🚨 🚨 Free Course 🚨 🚨 🚨 🇺🇸 Create An Animated Landing Page by HTML, CSS and JavaScript 🌎 Language : English 👤 Publisher : Yasmin Vatankhah ⭐ Rate : 5.0 / 3 👥 Enroll : 1,000 💵 Price : $64 -> $0 https://www.discudemy.com/create-an-animated-landing-page-by-html-css-and-javascript

🚨 🚨 🚨 Free Course 🚨 🚨 🚨 🇺🇸 Gatsby JS | Build a personal blog using gatsbyJS 🌎 Language : English 👤 Publisher : ⭐ Rate : 4.6 / 340 👥 Enroll : 99,553 💵 Price : $44 -> $0 https://www.discudemy.com/gatsbyjs-graphql-build-a-personal-blog-using-gatsbyjs-graphql

🚨 🚨 🚨 Free Course 🚨 🚨 🚨 🇺🇸 Gatsby JS | Build a personal blog using gatsbyJS 🌎 Language : English 👤 Publisher : ⭐ Rate : 4.6 / 340 👥 Enroll : 99,553 💵 Price : $44 -> $0 https://www.discudemy.com/gatsbyjs-graphql-build-a-personal-blog-using-gatsbyjs-graphql

🚨 🚨 🚨 Free Course 🚨 🚨 🚨 🇺🇸 Gatsby JS | Build a personal blog using gatsbyJS 🌎 Language : English 👤 Publisher : ⭐ Rate : 4.6 / 340 👥 Enroll : 99,553 💵 Price : $44 -> $0 https://www.discudemy.com/gatsbyjs-graphql-build-a-personal-blog-using-gatsbyjs-graphql

🚨 🚨 🚨 Free Course 🚨 🚨 🚨 🇺🇸 Gatsby JS | Build a personal blog using gatsbyJS 🌎 Language : English 👤 Publisher : ⭐ Rate : 4.6 / 340 👥 Enroll : 99,553 💵 Price : $44 -> $0 https://www.discudemy.com/gatsbyjs-graphql-build-a-personal-blog-using-gatsbyjs-graphql

Tech Jargon - Decoded - Telegram 频道 @tech_jargon_decoded 的统计与分析