Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I didn't read the assignment but I can give you some basic code which you can finetune:
- char[] array1 = {'h','e','l','l','o','!'};
- char[] array2 = {'h','e','l','l','o'};
- boolean areEqual = false;
- if(array1.length == array2.length){
- for(int i = 0; i < array1.length; i++){
- if(array1[i] != array2[i]){
- break; //stop the for loop, continues at the next comment
- }
- if(i == array1.length-1){
- areEqual = 1;
- }
- }
- //And by next comment I mean this one
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement