I'm trying to reproduce some circuits with electronic pieces that I've at home. Unfortunately I miss some recommended transistors so I'm trying to understand how to replace them with an alternative transistor and overcome this problem.
How can I choose the right transistor alternative for my circuits. I know that there will be a lot of parameters depending from my circuit but which are the most important parameters that are mandatory? and are there criteria that could be helpful for choosing the right alternative?
My specific case
In my case I don't have a 2N2222 transistor. In alltransistors.com I've found that I can use BFX95, BSW63, ECG123A, MM531 that are different alternatives that I don't find in other site where it seems that 2N3904 is the right one. I don't know which are the parameters they look at. For example I'm try to amplify a signal and send it to a loud speaker (with a 100 Ohm resistor) in a circuit with a load lower than 6 V, can I use a C945 that as the same Ueb but uses an hfe of 130 instead of 100 of 2N2222? What will happen?