JAVA PROGRAMMING
4.93K subscribers
233 photos
186 files
91 links
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! 😊
Download Telegram
// 3. toLowerCase()
public class LowerCaseExample {
    public static void main(String[] args) {
        String str = "Hello, World!";
        String lowerCaseString = str.toLowerCase();
        System.out.println("Lowercase string: " + lowerCaseString);
    }
}
// 4. equals()
public class StringEqualityExample {
    public static void main(String[] args) {
        String str1 = "hello";
        String str2 = "HELLO";
        boolean isEqual = str1.equals(str2);
        System.out.println("Are strings equal? " + isEqual);
    }
}
// 5. substring()
public class SubstringExample {
    public static void main(String[] args) {
        String str = "Hello, World!";
        String substring = str.substring(7);
        System.out.println("Substring from index 7: " + substring);
    }
}
// 41. replaceFirst()
public class ReplaceFirstExample {
public static void main(String[] args) {
String str = "apple orange apple orange";
String replacedString = str.replaceFirst("apple", "banana");
System.out.println("String after replacing first occurrence: " + replacedString);
}
}
// 42. regionMatches()
public class RegionMatchesExample {
public static void main(String[] args) {
String str1 = "Hello World";
String str2 = "WORLD";
boolean matches = str1.regionMatches(true, 6, str2, 0, 5);
System.out.println("Do regions match ignoring case? " + matches);
}
}
👍1
// 43. offsetByCodePoints()
public class OffsetByCodePointsExample {
public static void main(String[] args) {
String str = "Hello World";
int index = str.offsetByCodePoints(0, 6);
System.out.println("Index after moving by code points: " + index);
}
}
❤1
// 44. join()
public class JoinExample {
public static void main(String[] args) {
String[] words = {"Hello", "World", "Java"};
String joinedString = String.join(", ", words);
System.out.println("Joined string: " + joinedString);
}
}
👍2
NOTE - Alpha delta and supreme batch course are include in this channel

Free for all 😁feel free to ask @imabhi3030

Javascript full course - https://t.me/Javascript_Course_js

full stack web devloper course - https://t.me/web_devloper_bro

Ethical hacking full course - https://t.me/Ethical_hackings_course

Reacts & nodejs full course - https://t.me/Reacts_Course

Linux full course - https://t.me/Linux_Courses

Python devloper full course - https://t.me/Python_Devloper

Machine learning & ai course - https://t.me/Machine_learnings_Ai

Android apps devloper full course - https://t.me/Mobile_Apps_devlopment

JOIN ALL IMPORTANT COURSE - 👉🏻 https://t.me/addlist/c3QWwWR-Iw4xMDNl
Subscribe our channel for coding, design, programming, Coreldraw, Excel, termux hacking, python animation, and more

Subscribe please -
👉✅ https://youtube.com/@CODEBOMBS
👍1
// 1. length()

public class StringLengthExample {
    public static void main(String[] args) {
        String str = "Hello, World!";
        int length = str.length();
        System.out.println("Length of the string: " + length);
    }
}
❤1👍1
Hi, you can start Placement Preparation with me in Sigma, 🔥Sigma Placement Batch (DSA + Development) :

Download link - 🔗 😁 https://drive.google.com/drive/u/0/mobile/folders/1BQzrA3ERRcPGEcbqWDfpFESboDbviF07

Free Study Resources join more ✅ https://t.me/addlist/c3QWwWR-Iw4xMDNl

Subscribe please -
👉✅ https://youtube.com/@CODEBOMBS
👍2
     🔰ᴏᴜʀ ᴀʟʟ ɢʀᴏᴜᴘs🔰

┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ᴄᴏᴅɪɴɢ ɢʀᴏᴜᴘ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ɢʀᴏᴜᴘ ᴄʟɪᴄᴋ ʜᴇʀᴇ  
┣◈ ‣ ʟʙsᴛɪ ɢʀᴏᴜᴘ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʙᴄᴀ ɢʀᴏᴜᴘ   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈

              🔰ʜᴀᴄᴋɪɴɢ ᴄʜᴀɴɴᴇʟs🔰

┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ᴛᴏᴏʟs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ᴛɪᴘs   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴛᴇʀᴍᴜx ᴛᴏᴏʟ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʟɪɴᴜx ᴛᴏᴏʟs ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈
 
              🔰 ᴘʀᴏɢʀᴀᴍᴍɪɴɢs 🔰

┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ᴄ ᴘʀᴏɢʀᴀᴍ   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴄ++ ᴘʀᴏɢʀᴀᴍ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴄ# ᴘʀᴏɢʀᴀᴍ   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴊᴀᴠᴀ ᴘʀᴏɢʀᴀᴍ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴄss ᴘʀᴏɢʀᴀᴍ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴘʏᴛʜᴏɴ ᴄᴏᴅᴇ   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴊᴀᴠᴀsᴄʀɪᴘᴛ   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴛᴍʟ ᴘʀᴏɢʀᴀᴍ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴘʜᴘ ᴘʀᴏɢʀᴀᴍ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ɴᴏᴅᴇᴊs ᴄᴏᴅɪɴɢ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ɢɪᴛʜᴜʙ ᴛᴏᴏʟs  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴍᴇᴍᴇ ᴢᴏɴᴇ   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ғʀᴇᴇ ᴄᴏᴜʀsᴇ   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋᴇʀ sᴄʀɪᴘᴛ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈

       🔰ʙᴄᴀ/ᴍᴄᴀ/ʙ.ᴛᴇᴄʜ ɴᴏᴛᴇs🔰

┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ 1sᴛ sᴇᴍᴇsᴛᴇʀ   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 2ɴᴅ sᴇᴍᴇsᴛᴇʀ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 3ʀᴅ sᴇᴍᴇsᴛᴇʀ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 5ᴛʜ sᴇᴍᴇsᴛᴇʀ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ 6ᴛʜ sᴇᴍᴇsᴛᴇʀ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈

       🔰ғᴜʟʟ ᴘʀᴇᴍɪᴜᴍ ᴄᴏᴜʀsᴇ🔰

┎┉┉┅┄┄┈•┉┅┄┄┈•┉┅┄┄┈•┉┅
┣◈ ‣ ᴀɪ ғᴜʟʟ ᴄᴏᴜʀsᴇ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴘʏᴛʜᴏɴ ᴄᴏᴜʀsᴇ ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʟɪɴᴜx ᴄᴏᴜʀsᴇ   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴊᴀᴠᴀsᴄʀɪᴘᴛ   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʀᴇᴀᴄᴛ ᴄᴏᴜʀsᴇ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ʜᴀᴄᴋɪɴɢ ғɪʟᴇs   ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴍᴏʙɪʟᴇ ᴀᴘᴘs    ᴄʟɪᴄᴋ ʜᴇʀᴇ
┣◈ ‣ ᴅᴇʟᴛᴀ ʙᴀᴛᴄʜ  ᴄʟɪᴄᴋ ʜᴇʀᴇ
┖┉┉┅┄┄┈•┄┈•┉┅┄┄┈•┉┅┄┄┈

Subscribe our channel for coding - https://youtube.com/@CODEBOMBS
//Armstrong number
import java.util.Scanner;

public class ArmstrongNumbers {

// Function to check if a number is Armstrong or not
public static boolean isArmstrong(int num) {
int originalNum = num;
int numDigits = String.valueOf(num).length();
int armstrongSum = 0;

while (num > 0) {
int digit = num % 10;
armstrongSum += Math.pow(digit, numDigits);
num /= 10;
}

return armstrongSum == originalNum;
}

// Function to print Armstrong numbers within a given range
public static void printArmstrongNumbers(int start, int end) {
System.out.println("Armstrong numbers between " + start + " and " + end + " are:");
for (int i = start; i <= end; i++) {
if (isArmstrong(i)) {
System.out.println(i);
}
}
}

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

// Input range from the user
System.out.print("Enter the start of the range: ");
int start = scanner.nextInt();
System.out.print("Enter the end of the range: ");
int end = scanner.nextInt();

// Call function to print Armstrong numbers in the given range
printArmstrongNumbers(start, end);

scanner.close();
}
}
👍3