Language: Java

//
public class StringTest {
public static void main(String[] args) {
        String str = "abcdefghijk";
        String newstr = getStr(str);
        System.out.println(newstr);
}

//
        static String getStr(String s) {
        String newStr = new String();

        //get length of string
        int temp = s.length();
        if(temp % 2 == 0) {
        for(int i = 1; i <= (temp - 1); i += 2) {

        //rebuild string
        newStr += s.charAt(i);
}
}
        else {
        for(int i = 1; i <= (temp - 2); i += 2) {

        //rebuild string
        newStr += s.charAt(i);
}
}

return newStr;
}
} 

Compiler output:
Main.java:2: error: illegal character: '\u00a0'
public?class?StringTest?{
      ^
Main.java:2: error: illegal character: '\u00a0'
public?class?StringTest?{
            ^
Main.java:2: error: illegal character: '\u00a0'
public?class?StringTest?{
                       ^
Main.java:3: error: repeated modifier
public?static?void?main(String[]?args)?{
^
Main.java:3: error: illegal character: '\u00a0'
public?static?void?main(String[]?args)?{
      ^
Main.java:3: error: illegal character: '\u00a0'
public?static?void?main(String[]?args)?{
             ^
Main.java:3: error: illegal character: '\u00a0'
public?static?void?main(String[]?args)?{
                  ^
Main.java:3: error: class, interface, enum, or record expected
public?static?void?main(String[]?args)?{
                       ^
Main.java:3: error: illegal character: '\u00a0'
public?static?void?main(String[]?args)?{
                                ^
Main.java:3: error: illegal character: '\u00a0'
public?static?void?main(String[]?args)?{
                                      ^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
 ^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
  ^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
   ^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
    ^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
     ^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
      ^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
       ^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
              ^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
                  ^
Main.java:4: error: illegal character: '\u00a0'
????????String?str?=?"abcdefghijk";
                    ^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
 ^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
  ^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
   ^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
    ^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
     ^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
      ^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
       ^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
              ^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
                     ^
Main.java:5: error: illegal character: '\u00a0'
????????String?newstr?=?getStr(str);
                       ^
Main.java:6: error: illegal character: '\u00a0'
????????System.out.println(newstr);
^
Main.java:6: error: illegal character: '\u00a0'
????????System.out.println(newstr);
 ^
Main.java:6: error: illegal character: '\u00a0'
????????System.out.println(newstr);
  ^
Main.java:6: error: illegal character: '\u00a0'
????????System.out.println(newstr);
   ^
Main.java:6: error: illegal character: '\u00a0'
????????System.out.println(newstr);
    ^
Main.java:6: error: illegal character: '\u00a0'
????????System.out.println(newstr);
     ^
Main.java:6: error: illegal character: '\u00a0'
????????System.out.println(newstr);
      ^
Main.java:6: error: illegal character: '\u00a0'
????????System.out.println(newstr);
       ^
Main.java:6: error: class, interface, enum, or record expected
????????System.out.println(newstr);
        ^
Main.java:7: error: class, interface, enum, or record expected
}
^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
 ^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
  ^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
   ^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
    ^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
     ^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
      ^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
       ^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
              ^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
                     ^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
                                   ^
Main.java:10: error: illegal character: '\u00a0'
????????static?String?getStr(String?s)?{
                                      ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
 ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
  ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
   ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
    ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
     ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
      ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
       ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
              ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
                     ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
                       ^
Main.java:11: error: illegal character: '\u00a0'
????????String?newStr?=?new?String();
                           ^
Main.java:13: error: illegal character: '\u00a0'
????????//get?length?of?string
^
Main.java:13: error: illegal character: '\u00a0'
????????//get?length?of?string
 ^
Main.java:13: error: illegal character: '\u00a0'
????????//get?length?of?string
  ^
Main.java:13: error: illegal character: '\u00a0'
????????//get?length?of?string
   ^
Main.java:13: error: illegal character: '\u00a0'
????????//get?length?of?string
    ^
Main.java:13: error: illegal character: '\u00a0'
????????//get?length?of?string
     ^
Main.java:13: error: illegal character: '\u00a0'
????????//get?length?of?string
      ^
Main.java:13: error: illegal character: '\u00a0'
????????//get?length?of?string
       ^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
 ^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
  ^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
   ^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
    ^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
     ^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
      ^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
       ^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
           ^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
                ^
Main.java:14: error: illegal character: '\u00a0'
????????int?temp?=?s.length();
                  ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
 ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
  ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
   ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
    ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
     ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
      ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
       ^
Main.java:15: error: class, interface, enum, or record expected
????????if(temp?%?2?==?0)?{
        ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
               ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
                 ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
                   ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
                      ^
Main.java:15: error: illegal character: '\u00a0'
????????if(temp?%?2?==?0)?{
                         ^
Main.java:16: error: illegal character: '\u00a0'
????????for(int?i?=?1;?i?<=?(temp?-?1);?i?+=?2)?{
^
100 errors
only showing the first 100 errors, of 190 total; use -Xmaxerrs if you would like to see more