Answer:
it would be nice if you gave some form of info here
Explanation:
in other words without information no help aka I'm slow and just need points
The answer is B , Hope this helps , I don’t speak Spanish but a little bit I understand , I’m sure that’s the correct answer answer
Answer:
Here is the program for the given question
Explanation:
class StringSet
{
ArrayList<String> arraylist; //a reference variable of ArrayList of generic type String
//A no argument constructor.
public StringSet()
{
arraylist=new ArrayList<String>(); //instantiating the ArrayList object
}
//A mutator that adds a String newStr to the StringSet object.
void add(String newStr)
{
arraylist.add(newStr); // add(String) method to add string to the arraylist
}
//An accessor that returns the number of String objects that have been added to this StringSet object.
int size()
{
return arraylist.size(); // size() method which gives the number of elements in the list
}
//An accessor that returns the total number of characters in all of the Strings that have been added to this StringSet object.
int numChars()
{
int sum = 0;
for(String str:arraylist) //for-each loop; can be read as for each string in arraylist
{
sum+=str.length();
}
return sum;
}
//An accessor that returns the number of Strings in the StringSet object that have exactly len characters.
int countStrings(int len)
{
int count = 0;
for(String str:arraylist)
{
if(str.length() == len)
count++;
}
return count;
}
}
Answer:
C
Explanation:
All the calculation by computer is performed in base 2. Base 2 is also named as binary computation and it is used in all the computer and digital data processing processors.
Some differences between base 2 and base 10 are:
- Base 2 number system contains 0 and 1 whereas base 10 is from 0 to 9.
- Digital systems works on 0 and 1 logic i.e on and off logic. So we use digital system easily in binary domain whereas, decimal system has 0-9 levels and they are hard to be catered in digital domain.
- Base 10 is used in normal calculations for daily use and binary is only confined to digital domain.