Answer:
The output is: Your cost is 100
Explanation:
Given
The above code snippet
and

Required
Determine the output of the code
if cost < 70 or cost > 150
The above condition checks if cost is less than 70 or cost is greater than 150
This condition is false because 100 is neither less than 70 nor is it greater than 150
So, the else statement will be executed.
discount = cost
Which means
discount = 100
So, the print instruction will print: Your cost is 100
Answer:
public void trimToSize() {
modCount++;
if (size < elementData.length) {
elementData = (size == 0)
? EMPTY_ELEMENTDATA
: Arrays.copyOf(elementData, size);
}
}
Now, the running time for copyOf() function is O(N) where N is the size/capacity of the ArrayList. Hence, the time complexity of trimToSize() function is O(N).
Hence, the running time of building an N-item ArrayList is O(N^2).
Please find the sample code below.
CODE
==================
import java.util.ArrayList;
public class Driver {
public static void main(String[] args) throws Exception{
int N = 100000;
ArrayList<Integer> arr = new ArrayList<>(N);
long startTime = System.currentTimeMillis();
for(int i=0; i<N; i++) {
arr.add(i);
arr.trimToSize();
}
long endTime = System.currentTimeMillis();
double time = (endTime - startTime)/1000;
System.out.println("Total time taken = " + time + " seconds.");
}
}
Explanation:
Answer:
In reality, a diluted type of acetone that dissolves plastics and coating is Nail polish removers.
Explanation:
The chemical composition of the material has permanently changed, nothing else than if you had shot it. No repair but replacement is available.
Acetone does not get along with plastics.
This classic timelapse video shows just how cheap plastic acetone is.
When it's out, I have my new AirPods Pro. I got a odd smell when I opened the box when I received it. The little one is solid and chemical. It's new, I guess, and after days it will be gone.
But after ten days of use it doesn't. And the smell remains strong. It won't go quickly, I believe.
Instead I noticed that the smell is often shaping the silicone tips.
About 8 hours a day I use this AirPods Pro. Is it possible for a long time to use this smelling tip?
Actually, I must say they are soft and work well for noise cancelation, I love this silicone tip. If the strange smell doesn't hurt. To me, that's good.
All of the answers above are correct
Answer:
the answer is D.All of the above