subject
Computers and Technology, 24.11.2020 01:10 aoexus

What will be the output of the given code? class BookName {
public void book() {
System. out. println(“new book”);
}
}
public class Check{
public static void main(String args[]) {
BookName c1[] = new BookName [5];
for (int i = 0; i<10 ;i++) {
c1[i] = new BookName();
c1[i].book();
}
}
}

A. to print new book five times
B. to print the numeral 5 five times
C. a runtime error
D. to print new book 10times

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Which best describes the condition under which the unicode output is the same as plain text?
Answers: 3
question
Computers and Technology, 23.06.2019 15:00
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
question
Computers and Technology, 23.06.2019 19:00
This question involves a class named textfile that represents a text file. public class textfile { private string filename; private string filename; private arraylist words; // constructors not shown // postcondition: returns the number of bytes in this file public int filesize() { } // precondition: 0 < = index < words.size() // postcondition: removes numwords words from the words arraylist beginning at // index. public void deletewords(int index, int numwords) { } // precondition: 0 < = index < = words.size() // postcondition: adds elements from newwords array to words arraylist beginning // at index. pub lic voidaddwords(int index, string[] newwords) { } // other methods not shown } complete the filesize() method. the filesize() is computed in bytes. in a text file, each character in each word counts as one byte. in addition, there is a space in between each word in the words arraylist, and each of those spaces also counts as one byte. for example, suppose the words arraylist stores the following words: { mary had a little lamb; its fleece was white as snow. } the filesize() method would compute 4 + 3 + 1 + 6 + 5 + 4 + 6 + 3 + 5 + 2 + 5 as the sum of the lengths of each string in the arraylist. the value returned would be this sum plus 10, because there would also be 10 spaces in between the 11 words. complete the filesize() method below: // postcondition: returns the number of bytes in this file public int filesize() { }
Answers: 1
question
Computers and Technology, 24.06.2019 06:30
Some peer-to-peer networks have a server and some don't. true false
Answers: 2
You know the right answer?
What will be the output of the given code? class BookName {
public void book() {
System...
Questions
question
Biology, 07.12.2021 01:00
question
Mathematics, 07.12.2021 01:00
question
English, 07.12.2021 01:00
question
Mathematics, 07.12.2021 01:00
question
Mathematics, 07.12.2021 01:00
question
Mathematics, 07.12.2021 01:00
Questions on the website: 13722361