April 13, 2026 | Daily Dev Log Java split "isn't" into two tokens today. That sentence sounds wrong. Here's why it's completely logical. HackerRank — Java Tokens: A token = a continuous sequence of letters (A–Z, a–z) A separator = any character that is NOT a letter So when Java hits the apostrophe in "isn't": → isn = first token → t = second token The regex that handles all separators: s.split("[ !,?._'@]+"); Breaking it down: → [ ] groups all separator characters → + means one or more in a row → trim() prevents empty strings at the start → Empty check handles all-whitespace input Input: He is a good boy, isn't he? Tokens: He is a good boy isn t he = 10 tokens One concept that looks simple until you hit the edge cases. trim() and the empty string check are what separate a passing solution from a failing one. Also today — the Todo App left the console. Yesterday it was pure JavaScript in a terminal. Today it runs in the browser with: → querySelector to grab DOM elements → addEventListener for add button → createElement to build new list items → Event delegation to handle delete → CSS red delete button The same logic from yesterday. The same array concept. Just connected to a real UI now. That is what DOM manipulation means — taking logic you already know and connecting it to what users actually see. posting daily until I'm hired. Open to opportunities in: Web Development | Java | Data Analytics | Cloud Computing #OpenToWork #Java #JavaScript #DOM #WebDevelopment #BuildInPublic #100DaysOfCode
Java Tokenizer and DOM Manipulation with JavaScript
More Relevant Posts
-
⏳ Day 23 – 1 Minute Java Clarity – this vs super Keyword Two powerful keywords… each with their own purpose! ⚡ 📌 What is this? Refers to the CURRENT class object. 👉 Used to avoid confusion between instance variables and parameters. 📌 Example: class Student { String name; Student(String name) { this.name = name; // this.name = instance variable } void display() { System.out.println(this.name); } } ✔ this.name → refers to the class variable ✔ name → refers to the constructor parameter 📌 What is super? Refers to the PARENT class object. 👉 Used to access parent class methods, variables or constructor. 📌 Example: class Animal { String type = "Animal"; void sound() { System.out.println("Some sound"); } } class Dog extends Animal { String type = "Dog"; void display() { System.out.println(super.type); // Animal ✅ System.out.println(this.type); // Dog ✅ super.sound(); // calls Animal's sound() } } 💡 Real-time Example: Think of a new employee joining a company 🏢 this → refers to themselves (their own skills, name, ID) super → refers to their manager/mentor (inherited rules, processes) When in doubt about which rule to follow → this = my own rule super = my manager's rule ✅ ⚠️ Interview Trap: Can we use this() and super() in the same constructor? 👉 NO! Both must be the first statement in a constructor. 👉 You can't have two first statements — so only one is allowed! 📌 Uses at a Glance: ✔ this → current class variable, method, constructor ✔ super → parent class variable, method, constructor ✔ this() → calls current class constructor ✔ super() → calls parent class constructor 💡 Quick Summary ✔ this = refers to current object ✔ super = refers to parent object ✔ Both can call constructors but not together ✔ super() is automatically called if not written explicitly 🔹 Next Topic → Exception Handling in Java Did you know super() is automatically added by Java if you don't write it? Drop 🔥 if this was new! #Java #JavaProgramming #ThisKeyword #SuperKeyword #OOPs #CoreJava #JavaDeveloper #BackendDeveloper #Coding #Programming #SoftwareEngineering #LearningInPublic #100DaysOfCode #ProgrammingTips #1MinuteJavaClarity
To view or add a comment, sign in
-
-
I spent my first 2 years writing Java the hard way. Verbose. Fragile. Full of boilerplate I didn't need. Then I discovered these 5 features — and I've never looked back. If you're a Java developer, save this post. 🔖 --- 1. Optional — stop pretending null doesn't exist How many NullPointerExceptions have you chased at midnight? I lost count. Then I started using Optional properly. Before: String city = user.getAddress().getCity(); // NPE waiting to happen After: Optional.ofNullable(user) .map(User::getAddress) .map(Address::getCity) .orElse("Unknown"); Clean. Safe. Readable. No more defensive if-null pyramids. --- 2. Stream API — ditch the for-loops I used to write 15-line loops to filter and transform lists. Streams cut that to 2 lines — and made the intent crystal clear. Before: List<String> result = new ArrayList<>(); for (User u : users) { if (u.isActive()) result.add(u.getName()); } After: List<String> result = users.stream() .filter(User::isActive) .map(User::getName) .collect(toList()); Once you think in streams, you can't go back. --- 3. Records — goodbye boilerplate data classes How many times have you written a POJO with getters, setters, equals, hashCode, and toString? Java Records (Java 16+) killed all of that in one line. Before (~50 lines): public class User { private String name; private String email; // getters, setters, equals, hashCode, toString... 😩 } After (1 line): public record User(String name, String email) {} Your DTOs and value objects will thank you. --- 4. var — let the compiler do the obvious work I was skeptical at first. Felt "un-Java-like." But for local variables, var makes code dramatically less noisy. Before: HashMap<String, List<Order>> map = new HashMap<String, List<Order>>(); After: var map = new HashMap<String, List<Order>>(); Still strongly typed. Just less noise. Use it for local scope — not method signatures. --- 5. CompletableFuture — async without the headache Threading used to terrify me. CompletableFuture changed that. Chain async tasks, handle errors, combine results — all without callback hell. CompletableFuture.supplyAsync(() -> fetchUser(id)) .thenApply(user -> enrichWithOrders(user)) .thenAccept(result -> sendResponse(result)) .exceptionally(ex -> handleError(ex)); Readable async Java. Yes, it's possible. --- I wasted months writing verbose, fragile code because nobody told me these existed. Now you have no excuse. 😄 Which of these changed your code the most? Drop a number (1–5) in the comments 👇 — I read every one. #Java #SoftwareEngineering #FullStackDeveloper #CleanCode #SpringBoot #CodingTips
To view or add a comment, sign in
-
...........🅾🅾🅿🆂 !!! 𝑷𝒍𝒂𝒕𝒇𝒐𝒓𝒎 卩卂尺 𝑺𝒊𝒎𝒓𝒂𝒏 𝙎𝙚 𝕄𝕦𝕝𝕒𝕜𝕒𝕥 🅷🆄🅸, but 🆁🅾🅱🆄🆂🆃 𝔸𝕣𝕦𝕟 nikla D͓̽i͓̽l͓̽ ka 🅳🆈🅽🅰🅼🅸🅲......!!!.............. Guys you must be wondering, what nonsense things am I writing...."kuch shaayar likhna hai toa kaahi aur likh, linkedin pe kiyu"??? But guess what.....the above phrase represents features of java: 🅾🅾🅿🆂:- 𝗢𝗯𝗷𝗲𝗰𝘁 𝗢𝗿𝗶𝗲𝗻𝘁𝗲𝗱 𝗣𝗿𝗼𝗴𝗿𝗮𝗺𝗺𝗶𝗻𝗴 ....'S' is just a connect letter...don't consider it... 𝑷𝒍𝒂𝒕𝒇𝒐𝒓𝒎:- 𝗣𝗹𝗮𝘁𝗳𝗼𝗿𝗺 𝗶𝗻𝗱𝗲𝗽𝗲𝗻𝗱𝗲𝗻𝘁.....java apps doesn't need to be recoded if you change the operating system😇😇😇 卩卂尺:- the word "par" sounds similiar to "por" and you can then call it 𝗣𝗼𝗿𝘁𝗮𝗯𝗹𝗲...Definitely platform independence makes java portable 𝑺𝒊𝒎𝒓𝒂𝒏:- Either you can say Simran sounds similiar to simple, hence 𝗦𝗶𝗺𝗽𝗹𝗲 is another feature....or say Simran is a very 𝗦𝗶𝗺𝗽𝗹𝗲 girl... 𝕄𝕦𝕝𝕒𝕜𝕒𝕥:- To say Mulakat, you need to say "Mul"...and at the end you are also using a "t"......guess it guess it.....yes it is 𝑴𝒖𝒍𝒕𝒊 𝑻𝒉𝒓𝒆𝒂𝒅𝒊𝒏𝒈....you will love smaller tasks in your programs into individual threads and then executing them concurrently to save your time.... 🅷🆄🅸:- doesn't "Hui" sound almost similiar to "high" I know there is a lot difference but say you are requiring same energy....just you can say "Hui" se 𝙃𝙞𝙜𝙝 𝙋𝙚𝙧𝙛𝙤𝙧𝙢𝙖𝙣𝙘𝙚.....ofcourse java gives a High level of performance as it is 𝑱𝒖𝒔𝒕 𝒊𝒏 𝒕𝒊𝒎𝒆 𝒄𝒐𝒎𝒑𝒊𝒍𝒆𝒅.... 🆁🅾🅱🆄🆂🆃:- Yes ofcourse java is 𝗥𝗼𝗯𝘂𝘀𝘁 because of its strong memory management..... 𝔸𝕣𝕦𝕟:- Arun contains "A" and "N".....Arun se 𝘼𝙧𝙘𝙝𝙞𝙩𝙚𝙘𝙩𝙪𝙧𝙖𝙡 𝙉𝙚𝙪𝙩𝙧𝙖𝙡....right??? Size of all data types in java is same for both 32 bit compiler as well as 64 bit compiler D͓̽i͓̽l͓̽ :- "Dil" had "DI" and "DI" se 𝗗𝗶𝘀𝘁𝗿𝗶𝗯𝘂𝘁𝗲𝗱...java Applications can be distributed and run at the same time on diff computers in same network 🅳🆈🅽🅰🅼🅸🅲:- Yes Java is also 𝗗𝘆𝗻𝗮𝗺𝗶𝗰 due to it's Dynamic class loading feature.... Just repeat the above phrase 2 to 3 times and you will be ablte to retain all the features of java untill you take your last breath.......100% guarantee....
To view or add a comment, sign in
-
Java asked me to validate an IP address using one line of regex. My brain left the chat. Here is exactly where I got stuck — and what I learned from hitting the wall. HackerRank — Java Regex. IP Address Validation. The requirement: Write ONE regex pattern that validates IP addresses in the format A.B.C.D where each value is between 0 and 255. What I understood immediately: → Four groups separated by dots → Each group needs 1 to 3 digits → \d{1,3} handles the digit part The wall I hit: In Java I would write: if(num >= 0 && num <= 255) Simple comparison. Easy. In regex you cannot do comparisons. You have to DESCRIBE every valid pattern explicitly: 0-9 → \d 10-99 → \d\d 100-199 → 1\d\d 200-249 → 2[0-4]\d 250-255 → 25[0-5] Then combine all of it into one pattern using | (OR). That is a completely different way of thinking. Not logic. Pattern description. Studying the full pattern tonight. Full solution tomorrow. JavaScript functions today: → Function declaration and calling → Loops inside functions → Conditional logic inside functions → One definition. Unlimited calls. Functions are the foundation of every React component, every Express route, every Java method. Getting this deeply right now matters more than rushing to frameworks. Posting daily until I'm hired. Stuck on regex. Back tomorrow with the solution. Open to opportunities in: Web Development | Java | Data Analytics | Cloud Computing For anyone who has worked with regex before — how did you first learn to think in patterns instead of comparisons? Drop it below, I reply to everyone 👇 #OpenToWork #Java #Regex #JavaScript #BuildInPublic #100DaysOfCode
To view or add a comment, sign in
-
-
Records in Java — Say Goodbye to Boilerplate Code Writing simple data classes in Java used to mean creating: fields constructors getters equals() hashCode() toString() A lot of code… just to store data. With Records (introduced in Java), Java made this much simpler. Instead of writing this: class Person { private final String name; private final int age; public Person(String name, int age) { this.name = name; this.age = age; } public String getName() { return name; } public int getAge() { return age; } } You can simply write: record Person(String name, int age) {} And Java automatically generates: 1. Constructor 2. Getter methods (name(), age()) 3. equals() 4. hashCode() 5. toString() Why Records matter? 1. Less boilerplate code 2. Immutable by default 3. Cleaner and more readable code 4. Perfect for DTOs, API requests/responses, and model classes Example: record Employee(String name, String department, double salary) {} Usage: Employee emp = new Employee("John", "Engineering", 90000); System.out.println(emp.name()); Records become even more powerful with modern Java features like Sealed Classes: sealed interface Shape permits Circle, Rectangle {} record Circle(double radius) implements Shape {} record Rectangle(double length, double width) implements Shape {} Modern Java is getting cleaner, safer, and more expressive. In one line: Records = Less code, more clarity. #Java #Java17 #JavaDeveloper #BackendDevelopment #Programming #SoftwareEngineering #Coding
To view or add a comment, sign in
-
Java has been my primary language for years. Statically typed, multithreading built-in, and one killer feature — the Reflection API: the thing that lets you reach into the guts of an object at runtime. It's what powers Spring, Hibernate, Jackson, and countless other tools and libraries we use every day. Dependency injection, JSON mapping, ORM magic — reflection is the engine underneath most of it. Then I tried Flutter. Flutter runs on Dart, and Dart's equivalent — Mirrors — is disabled. What used to be a no-brainer suddenly required planning. Every data class now needs a toJson() and a fromJson() method written by hand — or generated by tools like json_serializable. At first it felt like a step backward. But here's the thing — there's a reason Mirrors was disabled. Reflection is slow. Every app launch, the JVM is doing expensive runtime introspection. If you've ever stared at a large Spring app refusing to wake up in the morning... you know the feeling. ☕ That's exactly why frameworks like Micronaut and Quarkus exist. Instead of digging into the guts of objects at runtime, they generate all that code at compile time. The result? Blazing fast startup with none of the overhead. Flutter's constraint wasn't a limitation — it was a design choice that pointed toward a better pattern. Sometimes the wall you hit is actually there to protect you. This reminds me of Sourat Al-Kahf — the meeting of Prophet Musa (Moses) and Khodr (Al-Khidr). Every time Khodr did something that seemed wrong or harmful, there was a deeper wisdom behind it that Musa couldn't see yet. The constraint that frustrated him was quietly serving a greater purpose. Sometimes in tech — and in life — the limitation that slows you down is the very thing pushing you toward a better way. #Java #Flutter #SoftwareEngineering #BackendDevelopment #Dart #MobileDev
To view or add a comment, sign in
-
We're open-sourcing a multi-agent framework for Java. Not a wrapper around a Python library. Not a chat loop with tool calls. A structured orchestration framework — declarative plans with parallel steps, loops, branches, human checkpoints and crash recovery. Built from everything we learned building Agentican, our AI workforce platform. The hello world is two lines. Set an LLM key, call agentican.run() with a task description. The built-in Planner determines what agents and skills are needed, defines them, builds the plan, and executes it. When you're ready for more control, register your own agents and skills. Build plans with branching, looping and parallel execution. Gate tool calls with human approval. The framework persists everything — if the server dies mid-workflow, tasks resume automatically on next boot. Java-native. Quarkus-first. No Python sidecars. No glue code. https://lnkd.in/gjTUKrBN
To view or add a comment, sign in
-
A new blog introducing the Agentican Frameworks, OSS multi-agent orchestration for Java. Includes an overview of the concepts, and code snippets so you can see what's it looks like in action. Still lots to do, but I think it's shaping up nicely. As a Java developer (and old school Red Hatter), this is what I'd look for in a modern Java framework -- virtual threads, Quarkus integration and more.
We're open-sourcing a multi-agent framework for Java. Not a wrapper around a Python library. Not a chat loop with tool calls. A structured orchestration framework — declarative plans with parallel steps, loops, branches, human checkpoints and crash recovery. Built from everything we learned building Agentican, our AI workforce platform. The hello world is two lines. Set an LLM key, call agentican.run() with a task description. The built-in Planner determines what agents and skills are needed, defines them, builds the plan, and executes it. When you're ready for more control, register your own agents and skills. Build plans with branching, looping and parallel execution. Gate tool calls with human approval. The framework persists everything — if the server dies mid-workflow, tasks resume automatically on next boot. Java-native. Quarkus-first. No Python sidecars. No glue code. https://lnkd.in/gjTUKrBN
To view or add a comment, sign in
-
𝗝𝗗𝗞 𝘃𝘀 𝗝𝗥𝗘 𝘃𝘀 𝗝𝗩𝗠 Here's what actually happens when you run a Java program — and the parts most engineers never learn: JDK → JRE → JVM → JIT 𝗝𝗗𝗞 (Java Development Kit) Your complete toolbox. Compiler (javac), debugger, profiler, keytool, jshell — and a bundled JRE. Without it, you can't write or compile Java. Just run it. 𝗝𝗥𝗘 (Java Runtime Environment) JVM + standard class libraries. Ships to end users. No compiler. No dev tools. Just enough to run a .jar. 𝗝𝗩𝗠 (Java Virtual Machine) This is where it gets interesting. 𝗧𝗵𝗿𝗲𝗲 𝗹𝗮𝘆𝗲𝗿𝘀 𝗶𝗻𝘀𝗶𝗱𝗲: • Class Loader — loads, links, and initializes .class files at runtime (not all at startup) • Runtime Data Areas — Heap, Stack, Method Area, PC Register, Native Method Stack • Execution Engine — interprets + compiles bytecode 𝗝𝗜𝗧 (Just-In-Time Compiler) Watches your code at runtime. Identifies "hot" methods — those called frequently. Compiles them natively. Skips the interpreter next time. That's how Java catches up to C++ performance on long-running workloads. 𝗪𝗵𝗮𝘁 𝗺𝗼𝘀𝘁 𝗱𝗲𝘃𝘀 𝗺𝗶𝘀𝘀 • 𝗖𝗹𝗮𝘀𝘀 𝗟𝗼𝗮𝗱𝗶𝗻𝗴 𝗶𝘀 𝗹𝗮𝘇𝘆 The JVM doesn't load all classes upfront. It loads them on first use — which is why cold start time differs from steady-state throughput. • 𝗝𝗜𝗧 𝗵𝗮𝘀 𝘁𝗶𝗲𝗿𝘀 HotSpot JVM uses tiered compilation: C1 (fast, light optimization) kicks in first, then C2 (aggressive optimization) takes over for truly hot code. GraalVM replaces C2 entirely with a more powerful compiler. • 𝗧𝗵𝗲 𝗛𝗲𝗮𝗽 𝗶𝘀 𝗻𝗼𝘁 𝗼𝗻𝗲 𝘁𝗵𝗶𝗻𝗴 It's split: Eden → Survivor Spaces → Old Gen → Metaspace (post Java 8). Understanding this is prerequisite to tuning GC and fixing OOM errors. • 𝗦𝘁𝗮𝗰𝗸 𝘃𝘀 𝗛𝗲𝗮𝗽 — 𝗿𝘂𝗻𝘁𝗶𝗺𝗲 𝗯𝗲𝗵𝗮𝘃𝗶𝗼𝗿 Every thread gets its own stack. Local primitives live there. Objects always go to the heap. References live on the stack. This is why stack overflows (deep recursion) and heap OOMs are completely different problems. • 𝗝𝗩𝗠 𝗶𝘀 𝗻𝗼𝘁 𝗮𝗹𝘄𝗮𝘆𝘀 𝗶𝗻𝘁𝗲𝗿𝗽𝗿𝗲𝘁𝗲𝗱 When GraalVM's native-image compiles your app ahead-of-time (AOT), there's no JVM at runtime at all. Instant startup. Fixed memory footprint. Different trade-offs. • 𝗕𝘆𝘁𝗲𝗰𝗼𝗱𝗲 𝗶𝘀 𝗻𝗼𝘁 𝗯𝗶𝗻𝗮𝗿𝘆 It's an intermediate representation — platform-agnostic instructions the JVM can run on any OS. This is Java's "write once, run anywhere" in practice, not just in theory. 𝗧𝗵𝗲 𝗺𝗲𝗻𝘁𝗮𝗹 𝗺𝗼𝗱𝗲𝗹 𝘁𝗵𝗮𝘁 𝗰𝗹𝗶𝗰𝗸𝘀: • JDK = write + compile + run • JRE = run only • JVM = execution environment • JIT = runtime optimizer What's the JVM internals detail that surprised you most when you first learned it? A special thanks to my faculty Syed Zabi Ulla sir at PW Institute of Innovation for their clear explanations and continuous guidance throughout this topic. #Java #JVM #SoftwareEngineering #BackendDevelopment #ProgrammingFundamentals
To view or add a comment, sign in
-
Java and JavaScript are not call by reference. It's time to clarify a common myth: “Java / JavaScript pass objects by reference” is not true. Both languages strictly use call by value, similar to Python. Why the confusion? When you pass objects, changes can sometimes reflect outside the function, which may appear to be call by reference. However, it’s actually value copying. To understand this, consider the memory architecture: - Stack: Stores variables and function calls, with each call creating a new stack frame. - Heap: Stores actual objects. Here’s what happens during a function call: 1. Variable Creation: - Primitives store actual values. - Objects store references (memory addresses). 2. Function / Method Call: - A new stack frame is created, and parameters become new local variables. 3. Core Step — Value Copy: - The value of the argument is copied. For primitives, the data is copied; for objects, the reference (address) is copied. It’s still a copy in both cases. 4. Inside Function: - Mutation works (e.g., 'obj.name = "Ishwar"' changes the same object in the heap). - Reassignment does not work (e.g., 'obj = new Object()' only changes the local copy). 5. Function Ends: - The stack frame is destroyed, and original variables remain unchanged. Mental Model: The caller variable copies the value to the function parameter, providing no direct access to the original variable—only a copy is used. This behavior applies to multiple languages: - Java: Call by value - JavaScript: Call by value - Python: Call by value (object reference) - C#: Call by value (default) Final truth: “Everything is pass by value. Some values just happen to be references.” 🔖 Follow CodeWithIshwar for more deep dives into real-world programming concepts. #CodeWithIshwar #Java #JavaScript #Python #Programming #SoftwareEngineering #BackendDevelopment #Coding #Developers #Tech #ComputerScience #OOP #Debugging
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