🚀 Practicing Java – Arrays Today, I practiced a basic Java array program to find the sum of all elements in an array. 📌 Key learnings: Arrays store multiple values in a single variable Index starts from 0 arr.length helps control loops Small steps, but building strong fundamentals in Java 💻✨ #Java #Arrays #LearningJava #FirstYear
Java Array Basics: Sum of Elements
More Relevant Posts
-
Understanding Global Variables in Java 🌐: Unlock the power of variables that live throughout your program! Learn how they simplify data sharing across methods while keeping your code clean and efficient. #JavaProgramming #CodingTips #LearnJava #GlobalVariables #DeveloperLife #SoftwareEngineering"
To view or add a comment, sign in
-
Java doesn’t support multiple inheritance to keep things simple, predictable, and maintainable. When two parent classes contain methods with the same name, the compiler faces ambiguity — known as the Diamond Problem. To avoid this confusion, Java allows multiple inheritance only through interfaces, not classes. Clear rules lead to better design. ☕ #Java #CoreJava #JavaConcepts #OOP #MultipleInheritance #DiamondProblem #SoftwareDesign #BackendDevelopment
To view or add a comment, sign in
-
-
✨2/100 Java Programs challenge : 📋category : Medium Solved Longest Substring Without Repeating Characters using Java. Implemented a brute-force approach to understand the problem deeply before optimizing. 📌 Key learnings: • String traversal • Handling duplicates efficiently • Improving problem-solving confidence On to the next challenge 🚀 #LeetCode #Java #DSA #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
Today, I learned about one of the most important parts of a Java program — the main() method, which is the entry point of execution in Java. 🔹 Key learnings : public → Makes the method accessible to the JVM static → Allows JVM to call main() without creating an object void → Specifies that the method returns no value String[] args → Used to accept command-line arguments Code inside the method body {} is executed first by the JVM I also wrote my first Java program and successfully printed output using System.out.println() 🎉 Understanding the structure of the main() method is a crucial step toward building a strong foundation in Core Java. #Java #CoreJava #JavaProgramming #LearnJava #JavaBasics #JVM #CodingJourney #ProgrammingLife #SoftwareDevelopment #DeveloperLife #ProgrammingFundamentals #TechLearning
To view or add a comment, sign in
-
-
#InterviewQuestions - 3 ❓ Can we overload the main method in Java? ✅ Yes, the main method can be overloaded in Java. ✔However, the Java Virtual Machine (JVM) will only ever recognize and execute the method with the exact signature: >>> public static void main(String[] args). ✔Overloaded main methods are treated just like any other method in the class and will not run automatically when you execute the program. ✔We must explicitly call the overloaded methods from within the standard main method if you want them to be executed. 📊 Examples and output are shared in the slides below ⬇️ #Java #MainMethod #MethodOverloading #JavaInterview #OOP #SoftwareEngineering #LearningEveryday
To view or add a comment, sign in
-
📘 Day 26 | Core Java Series An abstract class in Java provides partial abstraction. It can contain abstract methods (without body) and concrete methods. Key points: ❌ Cannot create object ✔ Can have constructors ✔ Supports inheritance Remember this: Abstract class = partial abstraction 📌 Save this for revision 💬 Feedback is welcome #Java #CoreJava #OOP #AbstractClass #LearningInPublic
To view or add a comment, sign in
-
-
DAY 7— Java Collections (Map & Set) Tomorrow I have a test on Java Map and Set, so today I focused on revising and practicing these concepts thoroughly. 1. Types of Map and Set 2. Differences between HashMap, HashSet, TreeMap, TreeSet 3. Null handling rules 4. Key–value behavior and uniqueness 5. Time complexity basics 6. Practice programs for better understanding Consistent small steps every day are building stronger fundamentals. Let’s see how it goes tomorrow #Java #CollectionsFramework #Map #Set #LearningJourney #Consistency #Preparation
To view or add a comment, sign in
-
Java Collections Tip That Improved My Code When choosing a collection, I keep this simple rule: ArrayList → fast reads, dynamic size LinkedList → better for frequent insert/delete (but slower random access) HashMap → fast lookup by key TreeMap → sorted keys Choosing the right structure = cleaner + faster code. #Java #Collections #BackendDeveloper
To view or add a comment, sign in
-
Ever wondered why main() is static in Java? Because the JVM needs a starting point before any object is created. A static method belongs to the class, not to an object — so the JVM can call main() directly using the class name. If main() were non-static, Java would first need to create an object… but to create an object, it would need main() 🤯 That’s why main() is static — simple, logical, and efficient. ☕ #Java #JavaConcepts #CoreJava #ProgrammingBasics #JVM #BackendDevelopment #DeveloperLearning #CodingConcepts
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