Java Hyd Team
746 subscribers
986 photos
39 videos
670 files
690 links
https://teamhydteam.my.canva.site/

Can visit us on our website 😊
Still working on it 😊
Download Telegram
In a recent interview, I was asked, do you know the concept of idempotency in APIs.
I had read it once but I couldn't recall it, felt dumb a bit, so I went back and I read all I can about it.

So here's an example, if the API's were not idempotent would have happened,

Let's say I want to buy a flight ticket from Ahmedabad to Delhi for 3000 INR. I am paying via my Paytm wallet having 10K balance.
I pressed the pay button but nothing happened so after a few seconds I again tried it and it was successful.

After a minute, I got 2 notifications saying we have booked your flight from Ahmedabad to Delhi and your current balance is 4000 INR, and with that follows a mild heart attack, and a loss of 3000 INR, and what if I was booking a flight from Ahmedabad to USA, ðŸ˜ĩðŸŠĶdead...(account balance).

But in real life, APIs are idempotent.
Meaning, when you press pay once, it stores your request, when you again retry it, it goes and checks, is it the same request??? If yes, it doesn't process it again and voilaa the payment is only done once.

#interview #api #idempotent #learningandgrowing
👍2
Cisco is hiring Software Development Engineer
Role: SDE
Location: Bangalore
Qualification: BE/BTech/ME/MTech/MCA
Passout year: 2022 Batch
Salary: 10lpa - 14 lpa

Apply Now: https://jobs.cisco.com/jobs/ProjectDetail/Software-Engineer-Internal-Applications-New-Grad-India-UHR/1337682
👍1
Anonymous functions
Correct code but no results because this is a bug in anonymous functions
Because this keyword does not means instance var it's behaving like a local instance
To overcome context issues (this ) keyword issue we have arrow function
Parentheses, curly braces , and return keyword is optional in arrow function
DE-STRUCTURING In React-Js
Merge array with React-Js
Without main() can we compile Java code ??
Anonymous Poll
26%
Yes
74%
No
When we get noSuchMethodError:main exception
Anonymous Poll
57%
After compilation
43%
Before compilation
Which exception is noSuchMethodError:main
Anonymous Poll
63%
Runtime exception
37%
Compile time error