import java.util.Scanner;
public class U2_L3_Activity_Four {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter a sentence.");
String sent = scan.nextLine();
int count = 0;
for (int i = 0; i < sent.length(); i++){
char c = sent.charAt(i);
if (c != ' '){
count++;
}
else{
break;
}
}
System.out.println("The first word is " + count +" letters long");
}
}
We check to see when the first space occurs in our string and we add one to our count variable for every letter before that. I hope this helps!
Answer:
Option (3) is the correct answer of this question.
Explanation:
- HCatalog makes available Hive metadata to users of other Hadoop applications, such as Pig, MapReduce and Hive. it offers interfaces for MapReduce and Pig so that users can read data from and write data to the Hive warehouse.
- This means users don't have to care about where or in what format their data is stored. So we know this way that Hcatalog makes sure our data is secure.
- Others option does not belong to Hcatalog so these options are incorrect .
Answer:
B. The process will be terminated by the operating system.
Explanation:
When Round Robin is used for CPU scheduling, a time scheduler which is a component of the operating system is used in regulating the operation. A time limit is set for each of the processes to be run.
So, when a process fails to complete running before its time elapses, the time scheduler would log it off and return it to the queue. This queue is in a circular form and gives each of the processes a chance to run its course.
Answer: Primary Research (Focus Group).
Explanation:
Exploratory Research is an inquiry that seeks to understand the basic causal factors of a problem. This effort can serve as the basis of more intensive research later on.
There are basically two methodologies used, which are the; Primary and Secondary methods. While the Primary method's source of information is the concerned group, the Secondary Methods obtain their information from already existing information (Primary sources), such as Interviews, Journals, etc.
In the case of the company in the question, seeking to gain insight into the changes in a product, it would be best for them to consider what some selected costumers (focus group), think about the existing products and their views on subsequent changes. This method of getting information directly from the focus group employs the primary method.
Answer:
mobility and broad reach
Explanation:
The two major characteristics of mobile computing are:
Mobility: It basically refers to the portability. Mobility means that users can carry their mobile device wherever they go. This facilitates real-time communication with other devices. Users can take a mobile device anywhere and can contact with other devices and systems via a wireless network for example a user, wherever he happens to be, can log in to his email account to check his emails using his mobile phone.
Broad Reach: It basically means that the mobile device users can be reached at any time. This means that the users of an open mobile device can be instantaneously contacted. Having an open mobile device means that it can be reached by or connected to other mobile networks. However mobile users also have options to restrict specific messages or calls.