Outside the Class definition you can't declare variables. Like the other guys said, you need to declare them inside the class.
If they are public and declared inside class Stock, you can access them from any other class. If they are friendly (no keyword, just static int fruit = 0;) you can access them from any class in the package. How to access them will depend on whether they're static or not. static fields can be accessed by referencing the class itself (e.g. stock.fruit), while for non-static fields you'll need to reference an object that is an instance of the class holding the field.
Now, with that said, I would very much recommend that you declare your variables where they should logically be placed, according to the context of the program. I'm not entirely sure what demand and ch are intended to mean, but just know that you can put them in any class, including Fruitmarket, so long as they have the correct access level modifiers (public, friendly, etc) and you attempt to access them in the right way (through the declaring class if they are static or through an instance of the declaring class if they are non-static)