Dissect and make sure that I don’t onow the answer sorry brother
Answer:
public class Oops6
{
public static void main(String[] args) throws FileNotFoundException
{
Scanner in = new Scanner(new File("example.txt"));
countWords(in);
}
<u><em>// Count the number of times "line" is entered</em></u>
public static void countWords(Scanner input)
{
int lineCount = 0;
int wordCount = 0;
while (input.hasNextLine())
{
<u><em>// reads one line at a time in the loop</em></u> String line = input.nextLine();
lineCount++;
while (input.hasNext()) { // tokens in line
String word=input.next();
wordCount++;
}
}
System.out.println("Lines: " + 5);
System.out.println("Words: " + 21);
}
}
Answer:
37
Explanation:
Given int[] vals = {7,5,3,9,0,37,93,16,68,6,99};
In programming, the position of each value in the list are known as index. The first value is always assigned index of 0 not 1, the second value is assigned index of 1 and so on. For example;
val[0] = 7 i.e value with index 0
val[1] = 5
val[4] = 0
In order to print out this value
System.out.println(vals[vals[1]+vals[4]]);
Substituting the index value val[1] and val[4] into the argument given
vals[vals[1]+vals[4]]
= vals[5+0]
= vals[5]
= 37 (value at the 5th index)
System.out.println(vals[vals[1]+vals[4]]);
= 37
This means that the system will print out 37 to the console
B kidssssssssssssssssssssssss
Answer:
a medical journal/study from a licenced doctor on a website with .org
Explanation:
most medical journals from licenced doctors have .org in the end and are trusted