The demo application – time for code

In this section, we will take a closer look at the actual code of the demo project. Thereafter, we will do some simple modifications to the code and also use the debugger.

Inspecting an example code of the demo application

Let's take a first look at the generated code of MyDemo.java from the demo project.

The following code snippet shows the class definition:

public class MyDemo implements ApplicationListener {
  // ...
}

As you can see, the MyDemo class implements the ApplicationListener interface. The MyDemo class from Gradle project (demo-core) produces a quite different code as follows:

public class MyDemo extends ApplicationAdapter {
   //...
}

Here, the ApplicationAdapter is an abstract class that implements the ...

Get Learning LibGDX Game Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.