Welcome to the Ranch, Alb Albai.
I have created a class with several parameters.
In
Java, methods have parameters. A class only has variables and methods.
Also
you should use code tags while posting Java code which makes it readable. It's quite easy to do so.
All you need do is select your code and click the code button.
Another thing I noticed is your class name street starts with a small letter. It is a standard convention/practice in Java to start the class name with a capital letter and to use camelCase for variables.
So you might want to change 'public class street' to 'public class Street' and variables Noside, Noslot, and Valid to noSide, noSlot, and valid.
You might also want to consider formatting your code with proper indentations to make it more readable for you and for others. Also it helps in figuring blocks' scope easily.
one of the parameters i want to have an index and a value
So do you mean you want the array like functionality ( an aggregate variable ) but you don't know in advance the number of elements this variable will hold, and hence you want to collect this value from the user? Is it going to be a fixed size variable or is it something that can grow and shrink in size?
How about you also tell us what kind of data this variable will hold. There might be more than one way to achieve what you want but depending on the usage, the suitability of the options could vary.
Chan.