String day = "";
for (int i=0; i< days.length; i++) {
if (!dag.equals(day)) {
This part, what should it do?
Type: Posts; User: elamre
String day = "";
for (int i=0; i< days.length; i++) {
if (!dag.equals(day)) {
This part, what should it do?
What do you want to achieve exactly? I'm not quite understanding the purpose of this yet.
Also post your full output. This is what i did:
public static void main(String[] args){
String[]...
String[] days = { "Monday", "Tuesday", "Wednesday", "Turshday", "Friday", "Saturday", "Sunday" };
String day = "";
for (int i = 0; i < days.length; i++) {
day += days[i]; // previously...
Ah ok. Your day array has a length of 7 (Monday-Sunday are 7 days). Agreed? So the days.length will return 7. Only the thing is, it starts at 0 instead of 1. So "Monday" will be 0. and then it will...
What is line 32?