Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public class DependencyInjectionWithSpring {
  2. private WeatherService weatherService = new WeatherService();
  3.  
  4. public void run() {
  5. weatherService.printWeather();
  6. }
  7. }
  8.  
  9. public class WeatherService {
  10. public void printWeather() {
  11. System.out.println("The weather is sunny with a 20% chance of rain");
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement