3 String.format -> s.format
source | link

Java - 124119 bytes

I started with Java 8's StringJoiner, but that means including an import statement, so I decided to do it the old way:

void f(){String s="";for(int i=0;i<24;)s+=Strings+=s.format(",\n'%02d:00',\n'%02d:30'",i,i++);System.out.print(s.substring(2));}

Perhaps this can be improved by getting rid of the multiple occuring String and System keywords.

Java - 124 bytes

I started with Java 8's StringJoiner, but that means including an import statement, so I decided to do it the old way:

void f(){String s="";for(int i=0;i<24;)s+=String.format(",\n'%02d:00',\n'%02d:30'",i,i++);System.out.print(s.substring(2));}

Perhaps this can be improved by getting rid of the multiple occuring String and System keywords.

Java - 119 bytes

I started with Java 8's StringJoiner, but that means including an import statement, so I decided to do it the old way:

void f(){String s="";for(int i=0;i<24;)s+=s.format(",\n'%02d:00',\n'%02d:30'",i,i++);System.out.print(s.substring(2));}

Perhaps this can be improved by getting rid of the multiple occuring String and System keywords.

2 Implemented Geobits' suggestions
source | link

Java - 176124 bytes

I started with Java 8's StringJoiner, but that means including an import statement, so I decided to do it the old way:

class M{public static void mainf(String[] a){String s="";for(int i=0;i<24;i++i=0;i<24;){s+=String.format("'%02d",\n'%02d:00',\n'%02d:30',\n"30'",i,ii++);}System;System.out.print(s.substring(0,s.length()-2));}}

Perhaps this can be improved by getting rid of the multiple occuring String and System keywords.

Java - 176 bytes

I started with Java 8's StringJoiner, but that means including an import statement, so I decided to do it the old way:

class M{public static void main(String[] a){String s="";for(int i=0;i<24;i++){s+=String.format("'%02d:00',\n'%02d:30',\n",i,i);}System.out.print(s.substring(0,s.length()-2));}}

Perhaps this can be improved by getting rid of the multiple occuring String and System keywords.

Java - 124 bytes

I started with Java 8's StringJoiner, but that means including an import statement, so I decided to do it the old way:

void f(){String s="";for(int i=0;i<24;)s+=String.format(",\n'%02d:00',\n'%02d:30'",i,i++);System.out.print(s.substring(2));}

Perhaps this can be improved by getting rid of the multiple occuring String and System keywords.

1
source | link

Java - 176 bytes

I started with Java 8's StringJoiner, but that means including an import statement, so I decided to do it the old way:

class M{public static void main(String[] a){String s="";for(int i=0;i<24;i++){s+=String.format("'%02d:00',\n'%02d:30',\n",i,i);}System.out.print(s.substring(0,s.length()-2));}}

Perhaps this can be improved by getting rid of the multiple occuring String and System keywords.