Day 6 of Java Programming Journey 🚀 Today, I explored one of the most important topics in Java — Strings. Here’s what I learned: 🔹 A String is a collection (sequence) of characters. 🔹 It is a predefined class in Java, introduced in version 1.0. 🔹 The String class is final, which means it cannot be extended. 🔹 Strings in Java are immutable, meaning once created, their values cannot be changed. 🔹 There are two ways to create a String: 1️⃣ Using String Literals String name = "Java"; 2️⃣ Using the new keyword String name = new String("Java"); 10000 Coders #100DaysOfCode #LeetCode #Java #CodingJourney #ProblemSolving #Developer #Programming #LearnInPublic #Coding #10000Coders
"Exploring Java Strings: Immutable and Unchangeable"
More Relevant Posts
-
Mastering the Elements of Java Programming Language Every Java program is built on four key pillars: 🔹 Code Structure – Identifiers, classes, and methods that form the backbone of your program 🔹 Tokens – The smallest units (keywords, operators, literals) that guide the compiler 🔹 Syntax & Semantics – Rules and meaning that ensure code is both correct and logical 🔹 Comments – Notes that make code understandable for humans, not just machines Whether you’re just starting out or refining your skills, understanding these basics is the first step to writing clean, effective Java code #cubercore #Java #Programming #SoftwareDevelopment #Coding #TechLearning
To view or add a comment, sign in
-
-
🚀 Exploring Abstraction in Java! Today, I practiced one of the key OOP concepts — Abstraction using an example program in Java. In this program, I created an abstract class Shape and implemented different subclasses like Square, Rectangle, and Circle, each providing its own logic for calculating the area. ✨ Key Concepts Covered: Abstract classes and methods Method overriding Dynamic method dispatch Code reusability and clarity through abstraction 🧠 Output: The program accepts input for each shape and displays the calculated area dynamically. Learning abstraction helped me understand how we can hide implementation details and focus only on essential functionalities. 💻 #Java #OOPs #Abstraction #LearningByCoding #ProgrammingJourney #CodePractice
To view or add a comment, sign in
-
🚀 Exploring Java Fundamentals with a Practical Twist! Just shared a simple yet powerful Java program that identifies numbers divisible by both 3 and 5 within a user-defined range. It’s a great example of how object-oriented design and basic control structures come together to solve real-world problems. 🔍 What it does: Prompts the user for a range Iterates through numbers from 0 to that range Prints numbers divisible by both 3 and 5 💡 Whether you're just starting out or brushing up on your Java skills, this snippet is a great reminder of how clarity and logic go hand in hand in programming. #Java #Programming #ObjectOrientedDesign #CodingJourney #TechLearning #LinkedInLearning #SoftwareDevelopment
To view or add a comment, sign in
-
-
🏹 Day 27 of My Java Learning Journey 🎉 🚀 Understanding the length Property in Java Arrays ☕ Ever wondered how to find how many elements your Java array can hold? 🤔 That’s where the length property comes in your quick way to know the size of an array! In Java, every array has a built-in variable called length that tells you how many elements it can store. Example 👇 int[] numbers = {10, 20, 30, 40, 50}; System.out.println(numbers.length); When I first started with arrays, I used to write loops that went out of bounds until I discovered length. It saved my code from ArrayIndexOutOfBoundsException more times than I can count! 😅 Now, it’s my go-to check before every loop. 💡 Remember: length (for arrays) is a property, not a method. For strings, it’s length() - notice the parentheses! 🔥 Every small concept you learn adds a brick to your coding foundation. Keep building consistently! #Java #BackendDevelopment #CodingJourney #LearnInPublic #100DaysOfCode #JavaDeveloper #TechCareer #ProgrammingTips #CodeNewbie #Consistency
To view or add a comment, sign in
-
-
Day 19 of #50DaysOfCode – Java Today’s challenge: Count the number of even and odd digits in a given number! ✨ This problem helps strengthen your understanding of loops, modular arithmetic, and conditional logic — all key concepts in programming 💪 #Java #CodingChallenge #50DaysOfCode #ProgrammingBasics #LearnToCode #CodeNewbie #LogicBuilding #DailyCoding
To view or add a comment, sign in
-
💻 Exploring Patterns in Java! Today, I implemented a simple yet classic program — a Hollow Square Pattern using nested loops in Java. This program helps in understanding: ✅ The logic behind nested for-loops ✅ The use of conditional statements for pattern control ✅ How small programs improve logical thinking & coding structure Here’s the output for input 3: *** * * *** Every line of code brings a new learning opportunity. 🔥 #Java #Programming #PatternPrinting #DeveloperJourney #CodingPractice #LogicBuilding #LearnWithCode
To view or add a comment, sign in
-
-
🔹 The 4 Pillars of Object-Oriented Programming in Java Understanding the core principles of Object-Oriented Programming — Encapsulation, Inheritance, Polymorphism, and Abstraction — is essential for writing clean, reusable, and scalable code in Java. In this post, Otávio Borges breaks down each of these pillars with clear examples to help developers strengthen their object-oriented mindset. 💡 #Java #OOP #ObjectOrientedProgramming #JavaDevelopers #Programming #SoftwareDevelopment #Coding #LearnJava #BrasilJUG #DevsJava
To view or add a comment, sign in
-
#DAY68 #100DaysOFCode | Java Full Stack Development #Day68 of my #100DaysOfCode – Java 📘 Cursor in Java A Cursor in Java is used to traverse elements of a collection one by one. It provides a way to access, remove, or modify elements during iteration. Cursors are mainly used in the Collection Framework for iterating over lists, sets, and legacy classes. 🔹 Types of Cursors in Java Enumeration Used with legacy classes like Vector and Hashtable. Can only move forward. Cannot add or remove elements. Methods: hasMoreElements() – checks for next element nextElement() – returns next element Iterator Works with all collection classes. Can move only forward. Allows removal of elements during iteration. Methods: hasNext() next() remove() ListIterator Used only with List classes (ArrayList, LinkedList). Can move both forward and backward. Allows add, remove, and modify operations. Methods: hasNext(), next() hasPrevious(), previous() add(), remove(), set() A big thanks to my mentor Gurugubelli Vijaya Kumar Sir and the 10000 Coders for constantly guiding me and helping me build a strong foundation in programming concepts. #Java #Coding #Programming #100DaysOfCode #Java #programming #CodeNewbie #LearnToCode #Developer #Tech #ProgrammingTips #JavaDeveloper #CodeDaily #DataStructures #CodingLife
To view or add a comment, sign in
-
-
🌟 Main Method in Java The main method is the entry point of every Java program. It allows the OS to hand over control to your code for execution. 📝 Signature: public static void main(String[] args) 💡 public → accessible to OS 💡 static → no object needed 💡 void → no return 💡 String[] args → command-line arguments ✅ Example: class Demo { public static void main(String[] args) { System.out.println("Hello World!"); } } #Java #ProgrammingBasics #Coding #HelloWorld #LearningJourney #ComputerScience
To view or add a comment, sign in
-
-
🚀 #Day53 of My Java Journey — Inheritance in Java Today, I learned about Inheritance, a core pillar of Object-Oriented Programming. 𝐈𝐧𝐡𝐞𝐫𝐢𝐭𝐚𝐧𝐜𝐞 allows a class (child) to acquire properties and behaviors from another class (parent). This helps in code reusability and reduces duplication. 👉In Java, inheritance is implemented using the extends keyword: 𝑬𝒙: class Child extends Parent { } This means Child class automatically gets access to all non-private members of the Parent class. 𝗧𝘆𝗽𝗲𝘀 𝗼𝗳 𝗜𝗻𝗵𝗲𝗿𝗶𝘁𝗮𝗻𝗰𝗲 𝗶𝗻 𝗝𝗮𝘃𝗮: 1) Single-Level Inheritance → One parent and one child class. 2) Multilevel Inheritance → Grandparent → Parent → Child (a chain of inheritance). 3) Hierarchical Inheritance → One parent class with multiple child classes. 4) Multiple Inheritance→ Not allowed with classes due to ambiguity (Diamond Problem). ✅ But it is possible with Interfaces. 5) Hybrid Inheritance → Combination of two or more types of inheritance. 𝙈𝙚𝙩𝙝𝙤𝙙 𝙊𝙫𝙚𝙧𝙧𝙞𝙙𝙞𝙣𝙜: A child class can change the implementation of a parent class method using @𝑶𝒗𝒆𝒓𝒓𝒊𝒅𝒆 annotation. 🔗𝘾𝙤𝙣𝙨𝙩𝙧𝙪𝙘𝙩𝙤𝙧 𝘾𝙝𝙖𝙞𝙣𝙞𝙣𝙜: When inheritance happens, constructors are called in order: If parent has default constructor, Java automatically calls super(). If parent has parameterized constructor, we must call super(args) manually. *️⃣𝒔𝒖𝒑𝒆𝒓() or 𝒕𝒉𝒊𝒔() must be the first statement in a constructor. 10000 Coders #Java #OOP #Inheritance #CodingJourney #LearningByDoing #JavaProgramming
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development