This file contains 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
public interface LabeledEnum { | |
String getLabel(); | |
} |
This file contains 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
public class Solution { | |
public static Map<String, String> properties = new HashMap<>(); | |
public static Properties props = new Properties(); | |
public static void main (String[] args) throws Exception | |
{ | |
new Solution().fillInPropertiesMap(); | |
System.out.println(properties); | |
new Solution().save(new FileOutputStream("e:/f.properties")); | |
} |
This file contains 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
import java.util.ArrayList; | |
import java.util.Comparator; | |
import java.util.TreeMap; | |
public class LongestWord { | |
public static void main(String[] args) { | |
/* Creation an array of words */ | |
String words[] = { "five", "fivetwo", "fourfive", "fourfivetwo", "one", "onefiveone", "two", "twofivefourone" }; | |
/* Output */ |
This file contains 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
public class Palindrome { | |
public static void main(String[] args) { | |
/* Initialization of variables, array; assigning input integer */ | |
int naturalNumber = 203; | |
int palindrome = 0; | |
boolean palindromeFound = false; | |
char[] arr; | |
/* Increment the natural number is a palindrome not found */ | |
while (!palindromeFound) { |
This file contains 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
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import org.ho.yaml.YamlEncoder; | |
public class Xor { | |
public static void main(String[] args) throws IOException { | |
/* Create array */ |