I really love that game.It was .jar format so I used a decompiler.Is this really decompiled the right way?This is the .jar file if you want.
What I'm interested is in the level generation part.I think the above code is relevant to this?
Can anyone explain the code.please.

I'm not sure what's going on here, it's only a small portion of the code, and some of the logic makes no sense at all to me. It's pretty difficult to decipher code without seeing it all. What is the TiledLayer class? What's with calling methods on an int primitive:

paramInt.setCell(j, k, arrayOfInt);

Can you compile the code back into a .jar? Personally, I doubt it.

All this would be much easier for you, and for me, if you could ask more educated questions, by learning some Java. Sitting back and asking random people on the internet to help with random pieces of random code with no context at all is pretty rich!

I have provided the .jar file in my first post.
You said this is basic java.Learning java is not easy.It would take days if not weeks to learn all these.How did you learn java?By yourself?

I just want to copy the game.I can do everything except the level generation.
Of course I can learn java if I spend years.However,I am studying grade 10.I promise I will take java and programming courses after I go to A level.
That's all.

P.S I am not a spammer just registered to ask this question to random peoples on the internet.I have been on this forum for about a year now.

Staff: Mentor

Although I mentoned that I am not a programmer,I can still understand the logic behind the code if you explain it.

Well, of course. The point is, though, with your lack of knowledge about Java or programming in general, to explain this code we will basically have to teach you Java. That's not the purpose of this forum.

I agree with what Adyssa said, that you will need to spend some time learning basic concepts in Java before it's worthwhile for us to answer specific questions.

I just want to copy the game.I can do everything except the level generation.
Of course I can learn java if I spend years.However,I am studying grade 10.I promise I will take java and programming courses after I go to A level.
That's all.

P.S I am not a spammer just registered to ask this question to random peoples on the internet.I have been on this forum for about a year now.

As Addyssa said, the source is incomplete - not all of the jar code was decompiled. The other problem is that that source had oddities created by limitations in the decompiler. For example, when the decompiler sees the same memory location used in different locations in the code, it presumes it is the same variable - and uses the same name for it. It's also putting code in that was automatically generated by the compiler - and was not explicitly in the original code. I suspect that if you dig get the complete decompiled source, with a bit of work you could get it to recompile. But, as others have suggested, it would take skill, time, and effort.

BTW, your statement "I am not a programmer or anyone" is thoroughly false.

I just want to know the LOGIC behind this ENVIRONMENT GENERATION code.
As far as I know,logic does not have any specific language.You don't have to learn java to understand logic.Am I wrong?

Anyway,I have observed the game.(This is not an executable .jar file) using an emulator.
So I have seen a pattern where "Areas" are randomly picked from predefined "areas" and scrolled.
This is called logic

Cambridge AL 3rd edition said:

A particular way of thinking, especially one which is reasonable and based on good judgment

wikipedia said:

Logic (from the Ancient Greek: λογική, logike)[1] has two meanings: first, it describes the use of valid reasoning in some activity; second, it names the normative study of reasoning or a branch thereof.[2][3] In the latter sense, it features most prominently in the subjects of philosophy, mathematics, and computer science.

Anyway,I have observed the game.(This is not an executable .jar file) using an emulator.
So I have seen a pattern where "Areas" are randomly picked from predefined "areas" and scrolled.
This is called logic

No it is not. This is only what you observed from viewing the game. From what I see of the code that you posted, there is no randomization going on. The logic involved is how the background patterns are chosen, based on some input from the user.

You need to get up to speed with programming before asking us to teach you Java. There are online tutorials as well as many books that are available. Spend some time getting the basic ideas down, and then you'll be ready to ask us some educated questions.