Java tutorial
//package com.java2s; //License from project: Apache License public class Main { public static final String DEFAULT_SCORE = " - "; public static String getScores(int home_goals, int awaygoals) { if (home_goals < 0 || awaygoals < 0) { return DEFAULT_SCORE; } else { return String.valueOf(home_goals) + " - " + String.valueOf(awaygoals); } } }