Question: I have created a small spring-boot application, which does nothing but implement a login-form.

When I open my browser on http://localhost:8080/login while running my application, a login.html page is loaded, which references a css file as follows:

```
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Login Form</title>
    <link href="css/login.css"  rel="stylesheet">
</head> 

```

The css form is loading an image as background:

```
body {
    background: url("../imgs/backgroundImage.jpg");
    background-size: cover;
}

```

All of this works fine. The background image, however, is loading a bit slow, slower than the login-form does. And this is unpleasant, which is why I want to change it. Since I cannot compress my image any further, I figured, maybe loading the image inside my html file would be a bit faster than referencing the external stylesheet. That's why I deleted the background-part from my external css file and included the following style-tag in the head of my login.html:

```
<style>
    body {
            background: url("static/imgs/backgroundImage.jpg");
            background-size: cover;
    }
</style>

```

And now the background image does not load at all. I don't understand why the image wouldn't show at all and I was hoping someone here could explain.

The resources are located in the following way:

```
resources
    static
        css
            login.css
        imgs
            backgroundImage.jpg
    templates
        login.html

```

Answer: 
You are creating a local variable `age` with value `20` and doing nothing else with it. Your constructor needs to look like this:

```cpp
Person() : age{20} {}

```

Then it will actually initialize the instance field as expected.

(Otherwise `age = 20;` in the constructor body (without the `int` declaration that hides the field name) would have worked as well. But in general it is good practice to always initialize fields in an initializer list rather than in the constructor body. (The most obvious benefit being that the fields can be `const`, but there are also other benefits, such as a well-defined and enforced and easy-to-read order of initialization.))

(Also, `using namespace std;` is an antipattern; please don’t do that.)
```
#include <iostream>

using namespace std;

class Person
{
public:
    int age;

    Person(){
      // int age = 20; // the mistake was here
       age = 20; // that's correct
    }
};

int main()
{
   Person p;
   cout << p.age << endl;
}

```