Why java do not work if we copy and paste it in Extension developement?

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

  1. Java

  2. 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

0 voters

This is my second guide. The first was
How do we create an extension for Niotron?


I have made this post as wiki now anyone can edit this post only edit if I do mistake anywhere

1 Like

Thank you @Aquib_Khan for edit

1 Like

Huh, Again editted it and fixed many typos and missing words. :blush:

That’s my typing mistake

Ya, I know that. That’s why I fixed it.

1 Like

Thank you for fixing

And I am only fixing those things that I am able to fix or know how to fix them.

1 Like

Your welcome ! :blush: :blush: :blush: :blush:

1 Like

How much you like this guide


mmmmmmmmmm… This much - :100: :100: :100: :100: :100: :100: :100: :100: :100: :100: :100:

1 Like

Thank you @Aquib_Khan

Your welcome @Faraz_Firoz !

1 Like

@moderators Is there is no any function to see who had voted in the poll

This is in mit app inventor commmunity.
Maybe here tooo.

I do not found it if you know then tell me

MIT app inventor community or Niotron community?

I am talking about Niotron community

I don’t know that then.

For me no option to create polls now. Later it will be…
In niotron community.