Answer:
The get() method of the ArrayList class accepts an integer representing the index value and, returns the element of the current ArrayList object at the specified index. Therefore, if you pass 0 to this method you can get the first element of the current ArrayList and, if you pass list.
You have to make sure the BIOS boot is set to the normal hard drive first, then plug in the SATA cable and power properly
Like safety rules like what to do privacy, plagarizim, and cyberbullying and what not. Just stuff like that.
Answer:
A lot is wrong with the program given in the question. See the corrected version below:
<em>public class ANot {</em>
<em> public static void main(String[] args) {</em>
<em> int a, b, c;</em>
<em> //Three integers</em>
<em> a = 3; b = 4; c = a + b;</em>
<em> System.out.println("The value of c is " + c);</em>
<em> }</em>
<em>}</em>
Explanation:
Errors:
1. The main method had a semi colon after it. This is wrong
2. An open brace was supposed to follow the main method
3. The declaration of the variables was supposed to end with a semi colon
4. the correct comment style is // and not \\
5. Initialization of variables was supposed to end with semi colons
6. The output statement had C and not c which is the declared and initialized variable..Java is strictly typed
7. Open and closing braces for the class and method wrongly placed
Answer:
# include <conio.h>
# include <iostream.h>
using namespace std;
main{
int a[25], sum;
cout<<"enter the values in array a";
for (int i=0; i<= 24 ; i++)
{
cin>>a[i];
}
sum =0;
for (int j=0; j<=24 ; j++)
{
sum= sum + a[j];
}
cout<< sum;
getch ();
}