In this guide I will tell you why java does not work if we copy and paste it in Extension development?
Why java do not work if we copy and pate it in Extension development?
It does not work if we copy and paste it in extension development, we need to make some changes in it.
Java code
public class AddTwoNumbers {
public static void main(String[] args) {
int num1 = 5;
int num2 = 15;
int sum = num1 + num2;
System.out.println("Sum of these numbers: "+sum);
}
}
How we use java code in extension development?
@SimpleFunction(description = "")
public int Add(int num1, int num2) {
int sum = num1+num2;
return sum;
}
How many type of java use in extension development
There are two main java that is use in extension development
-
Java
-
Android Java
If we use java then we need to made some changes but if we use android java then we do not need to made any changes
- Helpfull
- Not helpfull
This is my second guide. The first was
How do we create an extension for Niotron?