Conversation
sergeylukichev
approved these changes
Nov 21, 2019
sergeylukichev
left a comment
There was a problem hiding this comment.
This pull request contains way to many tasks from previous lessons and should be split.
| private Address address; | ||
| private List<Phones> phones; | ||
|
|
||
|
|
| Person person = mapper.readValue(new File("persons.json"), Person.class); | ||
| System.out.println(person); | ||
| */ | ||
| String url = "http://api.openweathermap.org/data/2.5/weather?q=London,uk&APPID=0e2441af1b772fa31363023705b6351c"; |
There was a problem hiding this comment.
Think of making the code an application: reusable, testable and shippable so others could start it and specify a city other than London without modifying the code and recompiling it. Hint: think which classes could be in the application, which fields/properties they have? You should not probably disclose the url string since it contains APPID, which is you personal secret information.
lesyaAn
commented
Dec 5, 2019
Owner
Author
lesyaAn
left a comment
There was a problem hiding this comment.
package de.telran;
import org.w3c.dom.css.Counter;
public class Main {
public static void main(String[] args) throws InterruptedException {
Counter counter = new Counter();
ThreadIntegersThread thread1 = new ThreadIntegersThread(counter);
ThreadIntegersRunnable thread2 = new ThreadIntegersRunnable(counter);
Thread thread = new Thread(thread2);
thread1.start();
thread.start();
thread1.join();
thread.join();
System.out.println(thread1.getCounter());
System.out.println(thread2.getCounter());
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.