Welcome to the Ranch
That is not a statement, but a declaration of a public field. Make all your fields, except for global constants, private. You assign to it the same way you assign to anything else
What you achieve is not having to write the entire Foo class again. I think you need to go back and read what it says in Head First
Java about objects and object‑orientation. There is quite a lot.