publicvoid getobjrecipie(String compare)
int num = 0;
for (recipie recipes: objlist)
catch (Exception e)
System.out.printf("nah we don't have that, or ... %s", e);
objlist.get(num).printrecipie();//this is wrong, it works but i think its not correct, that and catch is called :/
@LB do you know why i get an error "non static method cannot be referenced from static context?" I solved this before by having said thing in a function, this time its i a function :/ and if i take off extends it says cannot resolve, i guess its inherited nothing, oh dear bended head its late i need sleep and WAY more practice.
Im trying to convert the problem into c++ness so i can solve it in mah head
For what line of code does it say that? It sounds like you're trying to call an instance method (a method without the static qualifier, hence a non-static method) via the name of the class (which is a static context) instead of via the name of an object or 'this' (which is an instance/non-static context)
You don't need to use any static besides one in main.
In most cases appearance of static state in your code means designers were lazy and didn't do the architecture well enough.
@Luc Lieber, I havn't learnt hash and map stuff yet, guess it was already time, You know i looked at that and thought i would learn it later, Bucky didnt let me in on that secret did he, nooh, he kept it to himself >:(
Can you help me finish this hackish hackjob tho, or is it impossible?
yeah theres no way i could use the objectlist if eveything starts being static because theres an error.
Im not sure if i have perfectly grasped static now :/