Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String UpdateArticle(Article article, String id) {
- for( int i = 0; i < articles.size(); i++ ) {
- Article a = articles.get(i);
- if( a.getId().equals(id)) {
- articles.set(i, article);
- return "Pomyślnie zaktualizowano wpis";
- }else {
- return "Nie udało się zaktualizować wpisu";
- }
- }
- return "Wystąpił nieoczekiwany błąd";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement