Question: I have developed a website for PC using asp.net MVC5. Now trying to develop a mobile supported anonymous access web page for same website using asp.net MVC5. I created a new project for this and downloaded jQuery.Mobile.MVC from Nuget console. This added mobile layout in the project with the JS code 

```js
$(document).ready(function () {
    $.mobile.ajaxEnabled = false; 
});

```

I just added a new view with this mobile layout and added few label controls to see how it works. It throws below error

JavaScript runtime error: Unable to set property 'ajaxEnabled' of undefined or null reference

Do I have to add any other libraries? This is my first mobile page. It would be great if you are help with some good tutorials

I have included jquery.mobile.js references

Thanks

Answer: 
**It can change the Behaviour of the methods in the Wrapper class.** 

Let's say you have an `Employee` class that has a method `greet`. When the `greet` method is called it simply prints `Hello everyone!`. So that is the ***expected behavior*** of `greet` method

```
public class Employee {

    void greet() {
        System.out.println("Hello everyone!");
    }
}

```

Now, let `GrumpyEmployee` subclass `Employee` and override `greet` method as shown below. 

```
public class GrumpyEmployee extends Employee {

    @Override
    void greet() {
        System.out.println("Get lost!");
    }
}

```

Now in the below code have a look at the `sayHello` method. It takes `Employee` instance as a parameter and calls the greet method hoping that it would say *`Hello everyone!`* But what we get is *`Get lost!`*. This change in behavior is because of `Employee grumpyEmployee = new GrumpyEmployee();`

```
public class TestFinal {
    static Employee grumpyEmployee = new GrumpyEmployee();

    public static void main(String[] args) {
        TestFinal testFinal = new TestFinal();
        testFinal.sayHello(grumpyEmployee);
    }

    private void sayHello(Employee employee) {
        employee.greet(); //Here you would expect a warm greeting, but what you get is "Get lost!"
    }
}

```

This situation can be ***avoided*** if the `Employee` class was made `final`. Now it's up to your imagination the amount of chaos a cheeky programmer could cause if `Wrapper` Classes were not declared as `final`.
Sorry for this, activating this thread 5 years after, but i can't see any constructive suggestion for a solution - why don't you simply encapsulate it?

```java
public MyInteger {

  private Integer value;

  public MyInteger(Integer value) {
       this.value = value;
  }

//... Add your custom math methods here

}

```

Leaving this here if someone stumbles on this with similar questions :)