I would say yes, as the "comment" gets broken by the slash
True
Explain please why you think it will return true?
nr1 and nr2 are different numbers so why will they return true?
Because precision is lost when the cast is made to float. The least significant bits of the int are truncated. So the two values become the same float value.
Dim nr1 As Int = 200000000
Dim nr2 As Int = 200000050
Dim f1 As Float = nr1
Dim f2 As Float = nr2
Log(f1 = f2)
Log(GetType(f1))
Waiting for debugger to connect...
Program started.
false
java.lang.Float
int n1 = 200000050
(float) n1 //2.00000048E8
(double) n1 //2.00000050E8
Did you test the float example in Java? I ran some tests in jshell 9.0.4.
Looks like a Java float does have enough precision to avoid the accidental equality with 200000000.B4X:int n1 = 200000050 (float) n1 //2.00000048E8 (double) n1 //2.00000050E8
The numbers are wrong in your B4X code. They should be:if b4x (b4j & b4a) creates 100% native java apps so why do i get False in it?
Dim nr1 As Int = 2000000000
Dim nr2 As Int = 2000000050
the \u000d is interpret as a linefeed and seperates the code from the // comment?
// Comments starts here:
// So here i will put some comments and write some stupid stuff about my code
// and pretend like i am writting only some inisant comments and noone (no hacker)
// will care about this very long comment section so he will go straight to the code
// but the i will put a code that i really would like to hide in this comment section
// like \u000d // ftp.connect(url, user, password);
// and the code will be executed even if it is inside this comment section
// ok, this is not a 100% protection agains Hackers, but its a really uniqe idea to hide
// very sensetive code
// https://stackoverflow.com/questions/8115522/a-unicode-newline-character-u000d-in-java
Are you wrapping libs yourself know that you're deep into java?
I have not wrap any libs until now but i am taking a java+android studio course for the last 2-3 month and i really start liking java.
I will start creating some apps on android studio for practice. But i must say that i miss a lot b4x stuff in android studio but still it is very powerful.