In: Computer Science
Print "Hello World" in the most complicated way (java)
Solution
Screenshot
Code
class HelloText implements Runnable
{
public void run(){
char l = ' ';
char[] h = new char[6];
int o = 0, m = 0, n = 0;
int[] k = {104, 101, 108, 108, 111, 32};
for (int i = h.length-1; i > -1; i--){
h[i] = (char) k[o++];
System.out.print(h[i]);
}
}
}
class WorldText implements Runnable
{
public void run()
{
int k = 100;
char kkkkkk = (char) 100+10+9;
char kkkkk = (char) 3*((2*15)+7);
char kkkk = (char) Math.sqrt(12996);
char kkk = (char) 0+(-1)+108+(1)*1;
char kk = (char) k;
System.out.println(kkkkkk+""+kkkkk+kkkk+kkk+kk);
}
static int excla(){
int i = (int) Math.pow(3,3)+6;
return i;
}
}
public class Main
{
public static void main(String[] args)
{
Thread worldt = new Thread(new HelloText());
Thread hellot = new Thread(new WorldText());
try
{
worldt.start();
worldt.join();
hellot.start();
hellot.join();
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
Output
---
all the best