0

u200b illegal character / java

Could anyone please help in this public class siham{ ​​public static void main(String[] args){ ​​int x=15; ​​sentence(x, 4); ​​int y= x-5; ​​sentence (y,x); ​​System.out.println(x+ "&" + y); ​public static void sentence(int num1, int num2){ num1=num1+num2; } ​​ } ​​}

16th Dec 2021, 1:03 AM
Siham
Siham - avatar
5 Answers
+ 2
Below is a cleansing of the code: public class siham{ public static void main(String[] args){ int x=15; sentence(x,4); int y = x-5; sentence(y,x); System.out.println(x+"&"+y); } public static void sentence(int num1, int num2){ num1 = num1+num2; } }
16th Dec 2021, 2:24 AM
Charles Jones
Charles Jones - avatar
+ 2
Ipang and Siham Apologies! I've heard of u+200b JS backdooring, but I'm not seeing any resources to support my claim.
16th Dec 2021, 6:39 AM
Charles Jones
Charles Jones - avatar
+ 1
u+200b is the unicode for a character that is 'unseen' and is well known as a troll character, hence illegal in most IDE's. Your solution is to delete all of your code and rewrite it. P.S. Most IDE's now a days (VS Code) implement a feature that exposes the u+200b character.
16th Dec 2021, 2:22 AM
Charles Jones
Charles Jones - avatar
+ 1
Charles Jones, It's interesting to know that invalid characters can be used to create a backdoor. How does it work when the compiler refuses to process those characters? Can you please elaborate further on that subject?
16th Dec 2021, 6:22 AM
Ipang
0
Thank you now its work
16th Dec 2021, 2:35 AM
Siham
Siham - avatar