Quiz 4 - 1
Quiz 4 - 1
Quiz 4 - 1
java.lang
import java.util.*;
import java.util.Scanner;
import package.className;
True
Which of the following wild card character is used to import all the classes in a particular package?
Koji se od sljedećih zamjenskih znakova koristi za uvoz svih klasa u određenom paketu?
The classes of the Java class library are organized into packages.
True
Which of the following two operations are appropriate for the main method?
True
Which of the following are the arguments in the following method?
Koji su od sljedećih argumenata u sljedećoj metodi?
Employee emp = new Employee();
emp.calculateSalary(100000, 3.2, 15);
100000, 3.2, 15
Which is a valid way of calling the testMethod in the TestClass? Assume a testInstance has been
created.
Koji je valjan način pozivanja testMethoda u TestClass? Pretpostavimo da je stvorena testna
instanca.public void testMethod(int x, double y){
System.out.println(x/y);
}
testInstance.testMethod(10, 3.5);
True
When you don’t want to repeat similar lines of code to describe an object’s behavior.
Once an object is instantiated, how might its fields and methods be accessed in Java?
Kada se objekt instancira, kako se njegovim poljima i metodama može pristupiti u Javi?
You’re designing banking software and need to store 10000 customer accounts with information on
the accountholder’s name, balance, and interest rate. The best approach is store 30000 separate
variables in the main method.
False
True
False
Which of the following statements are true?
import java.awt.font.TextLayout;
Java.awt.front
The JFrame and JOptionPane classes are in the javax.swing package. Which two will import those
classes?
Klase JFrame i JOptionPane nalaze se u paketu javax.swing. Koje će dvije uvesti te klase?
import javax.swing.JOptionPane;
import javax.swing.JFrame;
import javax.swing.*;
True
new