Is javascript promise the same as an arraylist in java?
Go to solution
Solved by reniat,
Apples and oranges. a promise in JS seems to be a way to write asynchronous code (i've never written concurrent JS, so i could be wrong), while an arraylist in java is just an implementation of an abstract data type. The only semi-related aspect of arraylist is that there are concurrency concerns in that arraylists are not synchronized so you need to be careful if you have multiple threads operating on the same list.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now