Logo
Explore Help
Sign In
iSharkFly-Docs/java-tutorials
1
0
Fork 0
You've already forked java-tutorials
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
java-tutorials/vertx-and-rxjava/src/test/java/com/baeldung/CityAndDayLength.java

19 lines
488 B
Java
Raw Normal View History

Bael 776 vert.x and rxjava (#2529) * Burlap & Hessian server added * Burlap & Hessian client work * Fixed main * Fixed formatting * Spring Remote example based on Burlap & Hessian runs in a JUnit test * Fixed main * Fixed formatting * Spring Remote example based on Burlap & Hessian runs in a JUnit test * Spring Remote example based on Burlap & Hessian runs in a JUnit test * Burlap & Hessian client work * Fixed main * Fixed main * Fixed formatting * Fixed formatting * Spring Remote example based on Burlap & Hessian runs in a JUnit test * Spring Remote example based on Burlap & Hessian runs in a JUnit test * Fixed POM * Vertx / RxJava example * BAEL-776 - Vertx and RxJava * BAEL-776 - Vertx and RxJava
2017-08-30 11:20:56 +02:00
package com.baeldung;
import java.text.MessageFormat;
class CityAndDayLength {
private final String city;
private final double dayLengthInHours;
public CityAndDayLength(String city, long dayLengthInSeconds) {
this.city = city;
this.dayLengthInHours = dayLengthInSeconds / (60.0 * 60.0);
}
@Override public String toString() {
return MessageFormat.format("In {0} there are {1,number,#0.0} hours of light.", city, dayLengthInHours);
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 121ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API