Nidhi Tiwari

420 posts

Nidhi Tiwari banner
Nidhi Tiwari

Nidhi Tiwari

@NidhiDevNotes

Java developer writing about system design, scalability, AKS, AI, real-world code mistakes.

가입일 Ocak 2026
82 팔로잉564 팔로워
고정된 트윗
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
Hello, I share real scenarios I deal with as a backend engineer. Mostly around: • Java • System Design • AKS / Cloud • Production edge cases Lately I post question-based scenarios, the kind interviewers ask and the kind that actually break in production. If you enjoy solving these, consider following. New questions every day.
English
1
0
7
606
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
@kritikakodes Because it doesn’t try all 10,000 combinations. It simply compares your entered PIN with the stored PIN (or its hash) in one step. So it’s a direct lookup (O(1)), not brute force that’s why it’s instant.
English
0
0
0
11
Kritika
Kritika@kritikakodes·
You type a 4-digit PIN. System rejects it instantly. There are 10,000 combinations. How does it check that fast?
English
9
1
7
318
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
@javarevisited JAVA PYTHON map() converts all to uppercase, then limit(2) takes first 2 elements, so only Java and Python get printed in uppercase. PS: I post similar content.. please check out my page and follow if it interests you.
English
0
0
1
38
Javarevisited
Javarevisited@javarevisited·
Java Stream Interview ☕ What will this print? List<String> names = List.of("Java","Python","Go"); names.stream() .map(String::toUpperCase) .limit(2) .forEach(System.out::println);
English
3
0
6
536
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
Assume this implementation is used by ~100 concurrent threads. Would you consider it safe for production use? If not, what specific issues would you expect to see? #Java #Concurrency #SystemDesign
Nidhi Tiwari tweet media
English
0
0
3
35
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
@javarevisited B. Exception. Streams in Java are single-use. After the first forEach, the stream is consumed/closed. Calling forEach again will lead to IllegalStateException (stream has already been operated upon or closed).
English
0
0
6
757
Javarevisited
Javarevisited@javarevisited·
Java Stream Interview ☕ What will happen here? Stream<Integer> stream = Stream.of(1,2,3); stream.forEach(System.out::println); stream.forEach(System.out::println); A. Works B. Exception Why?
English
7
3
52
9.2K
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
@0xlelouch_ Total downtime is 50 minutes, exceeding the 43-minute SLA, so yes it’s a breach and the customer is eligible for compensation.
English
0
0
1
275
Abhishek Singh
Abhishek Singh@0xlelouch_·
An interesting question if you are into tech infra and observability! Your service has 99.9% uptime SLA (43 minutes downtime/month). You had 2 outages: 20 minutes and 30 minutes. Customer demands refund. Do they get it?
English
16
0
34
10.9K
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
@_jaydeepkarale ORDER BY created_at, default is ASC (ascending) That means oldest records first, not latest. So this query returns, first 10 payments ever created, not the newest ones.
English
1
0
1
290
Jaydeep
Jaydeep@_jaydeepkarale·
A dashboard query looks like this: SELECT * FROM payments ORDER BY created_at LIMIT 10; The team says this returns the latest payments. Are they correct?
English
8
0
25
5.9K
SumitM
SumitM@SumitM_X·
Two users hit "Book Now" at the exact same millisecond on Booking and Expedia. Only 1 seat left. Both requests reach your system. How do you make sure ONLY ONE ticket gets booked?
SumitM tweet media
English
25
6
107
24.3K
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
Case 1: a == b is true "Ja" + "va" is a compile-time constant (two string literals joined), so Java automatically interns it. Both a and b point to the same object in the String Pool. Case 2: c == b is false part + "va" involves a variable (part), so concatenation happens at runtime, creating a new String object on the heap, different reference than b.
English
0
0
0
237
Javarevisited
Javarevisited@javarevisited·
What prints? String a = "Ja" + "va"; String b = "Java"; System.out.println(a == b); Now try this: String part = "Ja"; String c = part + "va"; System.out.println(c == b); Why different results?
English
4
1
30
4.8K
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
@GuidesJava Ans: String Why? When you pass null, Java chooses the most specific method. So m1(String s) is more specific than the others, it gets called.
English
0
0
5
1.7K
Java Guides
Java Guides@GuidesJava·
Most asked Java coding program: What is the output of this program? Check out the answer and explanation: youtu.be/rwgmCundLL0?si…
YouTube video
YouTube
Java Guides tweet media
English
5
11
134
23K
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
@javarevisited Scaling databases is hard because data must stay consistent and synchronized across nodes, unlike stateless app servers.
English
0
0
1
132
Javarevisited
Javarevisited@javarevisited·
Interviewer: If horizontal scaling is easy with cloud platforms, why is scaling databases still hard?
English
8
0
19
4.3K
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
@javarevisited @override If equals() is overridden without hashCode(), HashSet allows duplicates because equal objects may have different hash buckets. PS: I post similar content. Please check out my page and follow if it interests you.
English
0
0
1
294
Javarevisited
Javarevisited@javarevisited·
Spot the issue: class User { private String email; @Override public boolean equals(Object o) { return email.equals(((User) o).email); } } What breaks when this object is used in a HashSet?
English
5
0
22
4.3K
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
This is how it works: Pre-stored popular searches : Google already has common queries saved Prefix matching : As you type “java”, it finds all searches starting with that Fast systems (caching) : Keeps frequent results ready in memory AI + your data :Uses your history, location, and trends
English
0
0
2
62
Javarevisited
Javarevisited@javarevisited·
Interviewer: You start typing a search query. And Google suggests results instantly. How?
English
2
0
7
1.4K
Javarevisited
Javarevisited@javarevisited·
How many objects are created? String s1 = "Hello"; String s2 = "Hello"; String s3 = new String("Hello"); 1? 2? 3? 👀
English
11
2
54
15K
Nandkishor
Nandkishor@devops_nk·
What are the your most 10 commonly use Linux commands ?
English
17
2
34
5.8K
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
@Math_files This is a geometric series with first term a = 1/2 and common ratio r = 1/2.
English
0
0
0
175
Math Files
Math Files@Math_files·
1/2 + 1/4 + 1/8 + ... = 1
Math Files tweet media
14
20
236
11.7K
Cipher
Cipher@Cipher_twt·
Vibe coder writing books in future
Cipher tweet media
English
95
616
11.2K
217.9K
Nidhi Tiwari 리트윗함
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
Java 26 just dropped and it’s LOADED! HTTP/3, Faster JVM, Primitive Patterns & finally… Applets are DEAD. 1. Primitive Types in Patterns No more boxing/unboxing headaches use primitives directly in switch switch (age) { case int i when i < 18 -> "Minor"; case int i when i < 60 -> "Adult"; default -> "Senior"; } 2. HTTP/3 Support Native HTTP/3 support ,no external libraries needed. HttpClient client = HttpClient.newBuilder() .version(HttpClient.Version.HTTP_3) .build(); 3. Lazy Constants Initialize only when needed, better performance. static final lazy String CONFIG = loadConfig(); 4. Structured Concurrency Cleaner, safer parallel execution try (var scope = new StructuredTaskScope.ShutdownOnFailure()) { var user = scope.fork(() -> fetchUser(id)); var order = scope.fork(() -> fetchOrder(id)); scope.join().throwIfFailed(); return new Response(user.get(), order.get()); } 5. Goodbye Applets This won’t even compile now: class MyApplet extends Applet {} RIP: 1995 → 2026 Follow for more such daily Java content. #Java26 #JDK26 #JavaDeveloper #Programming #Tech
English
1
1
9
290
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
Java just made it official: Applets are DEAD in Java 26 Remember college days? Writing your first tag, drawing circles, rectangles, and smiley faces using Graphics, making that bouncing ball animation (that never bounced smoothly), building a basic calculator UI, changing background colors on button click. It felt like magic back then, “Java can run inside a browser?!” And then, Waiting forever for it to load, clicking “Allow / Run” on scary security popups, debugging why nothing is showing on screen. Good times. But slowly, Browsers dropped support, Security issues piled up, Better technologies took over. And now in Java 26, Applets are gone for good. Not just a removal, it’s pure nostalgia. From: College applet programs to Desktop apps to Spring Boot & microservices Java evolved. And so did we. If you ever made a bouncing ball or drew a smiley using Applet, you’re not old, you’re OG Java dev! #Java #Java26 #Nostalgia #TechTwitter
English
0
1
3
110
Nidhi Tiwari
Nidhi Tiwari@NidhiDevNotes·
@Kekius_Sage The "nobody's in control" scenario Not one villain just AI systems running critical infrastructure, finance, and decisions, and slowly humans just stop being the ones actually in charge. Death by a thousand automations
English
0
0
0
15
Kekius Maximus
Kekius Maximus@Kekius_Sage·
What is the worst-case scenario for AI?
English
789
18
331
33.5K