Answer:
See explaination
Explanation:
import java.util.Scanner;
public class Word
{
public static void main(String args[])
{
Scanner read=new Scanner(System.in);
char repeat='Y';
String phrase=null;
int index=0;
while(repeat=='Y')
{
System.out.println("enter a phrase :");
phrase=read.nextLine();
while(index<=0)
{
System.out.println("enter an index greater than 0");
index=Integer.parseInt(read.nextLine());
}
String s;
int spaces = phrase == null ? 0 : phrase.length() - phrase.replace(" ", "").length();
int numofwords=spaces+1;
if(index>numofwords)
{
index=numofwords;
}
System.out.println("word is: "+ getWord(phrase,index));
System.out.println("do you want to repeat (Y/N)");
repeat=read.nextLine().charAt(0);
index=0;
}
read.close();
}
private static String getWord(String phrase, int index) {
// TODO Auto-generated method stub
Scanner in =new Scanner(phrase);
String word=null;
int wordindex=0;
while(wordindex!=index)
{
word=in.next();
wordindex++;
}
in.close();
return word;
}
}
Check attachment screenshot
Answer:B
Explanation:Showing parts of a whole.
Answer: D.) All of the above. (happy to help)
Explanation: A.)
problem solving
B.)
expertise
C.)
content
D.)
all of the above
Answer:
The difference between While loop and Do - While loop are explained below.
Explanation:
- While loop : It is a looping procedure in which the statements inside the while loop are executed depending on the condition outside the while before starting the loop.
- If the condition is true then the code inside loop is executed otherwise not.
- Do - While loop: It is a looping procedure in which the statements inside the loop get executed and then the condition at the end of the loop is checked.
- This means even the condition is fails the statements inside the loop are executed once.
- Do while loop name itself suggests that "do the while and then check the condition".
Answer:
<u><em>Source data entry devices are used for audio input, video input and to enter the source document directly to the computer. Source data entry devices do not require data to be typed-in, keyed-in or pointed to a particular location.</em></u>
Explanation: