mardi 2 mai 2017

Trouble in a if statement

i have some trouble to make a condition with a or . Look at my problem . if i execute that, it's works :

System.out.println(p_fileAccess.readLine().trim().startsWith("^ Item Type")); 

//it's saying true but if i do that

System.out.println("data :"+(p_fileAccess.readLine().trim().startsWith("* Item Type")||p_fileAccess.readLine().trim().startsWith("^ Item Type ")));

it's saying false can you help me?

Aucun commentaire:

Enregistrer un commentaire