reverse java
public void reverse()
{
for (int i = 0; i < size/2; i++)
{
int temp = get(i);
elementData[i] = elementData[size-i-1];
elementData[size-i-1] = temp;
}
}
reverse java
public void reverse()
{
for (int i = 0; i < size/2; i++)
{
int temp = get(i);
elementData[i] = elementData[size-i-1];
elementData[size-i-1] = temp;
}
}
reverse string java
String string="whatever";
String reverse = new StringBuffer(string).reverse().toString();
System.out.println(reverse);
reverse in jaav
// my linkedin : https://www.linkedin.com/in/vaalarivan-prasanna-3a07bb203/
list = new ArrayList<int> {3, 4, 7}; //initialising a list
Collections.reverse(list); //reverses a List or an ArrayList
//now, list is {7, 4, 3}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us