Code, Maker, Robotic, Open Source. Knowledge Bases

Tag: Java

  1. Docker - Create a Java development environment

    Yes is Docker Again 🐳. ! Well my work need to switch many different programming language and different development environment . Docker is really helpful There are two way to compile and execute you java code. Compile and execute inside the Docker or compile and execute outside the Docker instance. Compile your app…

    Docker, Java, OpenJDK, OpenJDK8, Compile Java, Execute Java, Open Java Development Kit

  2. Android Java - Get Eddystone Beacon Service Data and Convert

    On Android Eddystone beacon we can store some useful information inside Namespace and Instance to identify unique beacon. Before Learn and Play CTF event. byte, ASCII text, Decimal and Hex is difficult thing for me. But after learning CTF this become very easy . since this kind of numbers is very…

    Android, Java, Android 11, ASCII, Decimal, Hex, Bytes, byte array, Eddystone, Beacon, Bluetooth, Service Data, Namespace, Instance, convert decimal to hex, scan record

  3. If statement with String comparison fails

    == tests for reference equality. .equals() tests for value equality. == is for testing whether two strings are the same object. Comparison symbols is only can use by local variable only. Public Variable should use "equals" to compare. Java @Kroll.method public void ComparisonTest(String value) { String operation = value; String operation_local…

    Java, Titanium, If Statement, String, .equals(), ==, Comparison

  4. Java can't Use Switch on a String?

    In Java JRE 1.7 below switch is not allow to use String for input case. Only JRE1.7 Above can be use String in the Switch. *Note Titanium workspace compiler compliance default is 1.6 need manual change this inside by Set workspace compiler compliance settings to 1.7…

    Java, Titanium, Switch Case, JRE1.7, JRE1.6

  5. Java Check Input integer

    Java @Kroll.method public String InputCheck(String value1 , String value2) { String inputType= ""; String [] numbers = {value1, value2}; for(String x : numbers ) { try{ int checkInput = Integer.parseInt(x); inputType = "Number"; }catch (NumberFormatException ex) { //handle exception here inputType = "No Number!"; break; } } if(inputType == "Number"){ int Intvalue1 = Integer.parseInt(value1); int Intvalue2 = Integer.parseInt(…

    Java, JavaScript, Integer, check, Titanium