Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * 4.(b)
- * Date : 29.06.19
- */
- package Batch10mid;
- class array{
- private int[] list = {10,20,30,40,50};
- public void mystery(int[] array){
- int tep = array[array.length - 1];
- for(int i = 1; i < array.length; i++){
- array[i] = array[i-1];
- }
- array[0] = tep;
- }
- void call(){
- mystery(list);
- for(int i = 0; i < list.length; i++){
- System.out.print(list[i] + " ");
- }
- }
- }
- public class ArrayList {
- public static void main(String[] args){
- new array().call();
- //ob.call();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement