Feels Good To Be Back!! Today, I wrote a simple Java program that takes a character input and checks whether it’s a vowel or consonant. It’s a small yet fundamental logic-building exercise that strengthens understanding of conditional statements, character handling, and Scanner input in Java. KEY POINTS ‣User Input Handling: ‣Character Normalization: ‣Conditional Logic: ‣Logical OR Operator: ‣Input Validation Concept (optional to add): ‣Efficient and Simple Design: ‣Resource Management: Here is the code snippet!👇 #Java #LearningToCode #Practice #Buildinpublic #JavaDevelopment
Wrote a Java program to check if input is a vowel or consonant
More Relevant Posts
-
Today, I worked on a simple yet fundamental Java program to determine the largest among three numbers entered by the user. KEY POINTS ‣Package & Class Definition ‣User Input Handling ‣Decision Making (Conditional Logic) ‣Comparison Operators ‣Output ‣Resource Management ‣Simplicity and Readability Here is the code snippet!👇 #Java #LearningToCode #Practice #Buildinpublic #JavaDevelopment
To view or add a comment, sign in
-
-
🧠 Backend isn’t just about writing APIs — it’s about understanding the concepts that make systems scalable, secure, and reliable. Great summary from GeeksforGeeks for anyone serious about backend development. #Java #SpringBoot #BackendDevelopment #SystemDesign #GeeksforGeeks
How many of these basic concepts do you already know? Master these concepts and more and create an interview-ready portfolio with the JAVA Backend Development LIVE Program: https://lnkd.in/g3AR8Set . . . . #gfg #geeksforgeeks #gfg #java #javaconcepts #learntocode #buildprojects #learninpublic
To view or add a comment, sign in
-
Java Concept Explained Simply: final with Objects Many developers get confused about what happens when we use final with objects in Java. Let’s break it down with a simple example class Person { String name = "Alex"; } public class Test { public static void main(String[] args) { final Person p = new Person(); p.name = "Sam"; System.out.println(p.name); } } Explanation: The keyword final means you cannot reassign the reference p to another object. ✅ p = new Person(); → ❌ Compilation Error But you can modify the internal state of the object that p is pointing to. ✅ Changing p.name is perfectly allowed. So, when we run this program: 👉 Output: Sam #Java #CodingConcepts #InterviewPreparation #JavaDeveloper #LearnWithExample
To view or add a comment, sign in
-
Shallow vs Deep Copy in Java — What’s the Difference? Ever wondered why changing one object in Java sometimes affects another, even when you thought you made a copy? 🤔 This happens because of the difference between shallow and deep copies. A shallow copy duplicates only the top-level object, while a deep copy creates a completely independent clone — including all nested objects.
To view or add a comment, sign in
-
A quick java tip about primitives In Java, the GC does not clean up primitives. Primitives aren’t stored on the heap; they live on the stack or inline inside objects, so they don’t need garbage collection. GC only collects heap objects like Integer, arrays, and anything created with new. Primitive fields inside an object are just part of that object’s memory and disappear when the object itself is collected. #java #javadeveloper #javaprogramming #programming
To view or add a comment, sign in
-
#Corejava #Linkedin #interrviewpractices #simpleanswer What is public static void main(String[] args)? Ans: public: Means the method is visible everyone. static: Means it belongs to the class, not to objects. void: Means it doesn't return anything. main: Means it starting point of every java programs-it's where the programs begins running. (String[] args): It's used to take input from the command line. In short: public: Accessible by JVM. static: No object needed. void: No return value main: Every programs as start main method (String[] args): Command-line input
To view or add a comment, sign in
-
-
💡 “Ever wondered why ArrayList, HashSet, and Map exist when we already have arrays?” That’s where the power of the 𝗝𝗮𝘃𝗮 𝗖𝗼𝗹𝗹𝗲𝗰𝘁𝗶𝗼𝗻𝘀 𝗙𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸 comes in — one of the most essential yet misunderstood parts of Java! ☕ In my latest YouTube video, I’ve broken it down in the simplest way possible 👇 ✅ What exactly is the Collection interface ✅ How List, Set, and Queue extend it ✅ Difference between Collection and List ✅ Why we use ArrayList, LinkedList, and HashSet ✅ How Generics make our code type-safe and bug-free ✅ Practical examples using add(), get(), and indexOf() 🎥 Watch here: https://lnkd.in/gWNgAPku If you’re learning Java or preparing for interviews, this video will help you clearly understand how Collections work and how to use them efficiently in real projects. 💬 What’s your go-to collection type in Java — List, Set, or Map? Let’s discuss below 👇
🔥 1) Java Collections Framework Explained | List, Set, ArrayList & Generics Made Easy
https://www.youtube.com/
To view or add a comment, sign in
-
💡 Java Tip of the Day: Immutability = Simplicity + Safety Immutable classes are thread-safe and easy to reason about. ✅ Example: public final class User { private final String name; public User(String name) { this.name = name; } public String getName() { return name; } } No setters, all fields final, and the class itself final. Frameworks like String, Integer, and even DTOs often rely on immutability to ensure consistency. 💬 Do you use immutability often in your codebase? #Java #CleanCode #ThreadSafety #CodeTips
To view or add a comment, sign in
-
I had this post on my wall today and actually, while really basic, this topic is weirdly interesting. The post mentioned that "a+b is promoted to int" which is not exactly what happens. Actually the operants are converted to "int" before the operation is performed. This is actually the same (and in fact specified) for several languages like Java, C#, C, C++ and for multiple reasons - which are partially decisions made around historic constraints. Newer languages like Rust, Go, Zig, Kotlin, ... don't mirror this and keep the type as specified in the parameters. Back to the example: Java (and also C#) won't do the implicit narrowing to "byte" for strictness and safety reasons, thus the compiler will complain. In C or C++ the implicit narrowing cast is actually done, so the first example compiles just fine "uint8_t c = a + b;". But handling this strictly raises a problem for C# and Java with compount operators. Here the parameters still are promoted to "int" but the specification explicitely states that the behaviour is identical to "E1 = (T)((E1) op (E2))", so a cast is performed. Pretty much solely to support compount operators as syntactic sugar. #Java #CSharp #CPlusPlus #Codingtrivia
Senior Full Stack Java Developer | Spring Boot & Angular | AWS | Certified Professional Scrum Developer I (PSD I®) | Certified Professional Scrum Product Owner I (PSPO I®)
#Java #ProgrammingTips #JavaDevelopment #SoftwareEngineering #ByteShortInt #JavaTricks 𝗝𝗮𝘃𝗮 𝗧𝗶𝗽 : 𝗪𝗵𝘆 𝗯𝘆𝘁𝗲 + 𝗯𝘆𝘁𝗲 𝗯𝗲𝗰𝗼𝗺𝗲𝘀 𝗶𝗻𝘁 𝗯𝘂𝘁 𝗯 += 𝗮 𝘄𝗼𝗿𝗸𝘀 In Java, arithmetic operations on byte and short are automatically promoted to int. • a + b is promoted to int, so assigning it to a byte requires an explicit cast. • b += a is a compound assignment operator. It automatically casts the result back to the type of the left-hand side (byte in this case), so no explicit cast is needed. Understanding this subtlety can save you from unnecessary compilation errors when working with smaller numeric types in Java.
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