Hi
I have a project which will be list of names 1-20.
Every name can lead the user to many images.
Every image has two lines of text
Which class do you think I should use?
Printable View
Hi
I have a project which will be list of names 1-20.
Every name can lead the user to many images.
Every image has two lines of text
Which class do you think I should use?
I am confused what you are even asking. Which class do you think are options for your needs? Do you need to write your own class?Quote:
Which class do you think I should use?
Hi
I think I couldn’t explain what I mean, sorry for that.
I searched on the web and found this Code
public class WhileLoop {
public static void main(String[] args) {
System.out.println("Let's count to 10 using while:");
int i = 1;
while (i <= 10) {
System.out.println(i);
i++;
}
}
}
The result will be
Let's count to 10 using while:
1
2
3
4
5
6
7
8
9
10
1-Now I would like next to every num A name.
2- When you press on the name it will lead you to many images.
Note: I have been learning Java for Two weeks only
I decided to make my first program in order to practice & learn more &more.
There is a lot for you to learn about before you will be able to write a program with a GUI where a user can press a button and lead to other pages with images.
You should work on getting familiar with java by using the console for user input initially. For example look at using the Scanner class for getting user input.
Later you can move to using GUI to present windows with controls that users can interact with.