technology Online Quiz - 1834

A mixed technology quiz covering Bluetooth networking, computer networking protocols (OSI model, TCP/IP), and Java programming fundamentals.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Given: 1. package geometry; 2. public class Hypotenuse { 3. public InnerTriangle it = new InnerTriangle(); 4. class InnerTriangle { 5. public int base; 6. public int height; 7. } Which statement is true about the class of an object that can reference the variable base?

  1. It can be any class
  2. No class has access to base
  3. The class must belong to the geometry package
  4. The class must be a subclass of the class Hypotenuse
Question 2 Multiple Choice (Multiple Answers)

Which two statements are true about has-a and is-a relationships? (Choose two.)

  1. Inheritance represents an is-a relationship
  2. Inheritance represents a has-a relationship
  3. Interfaces must be used when creating a has-a relationship
  4. Instance variables can be used when creating a has-a relationship.
Question 3 Multiple Choice (Single Answer)

Given: 10: public class Hello { 11: String title; 12: int value; 13: public Hello() { 14: title += " World"; 15: } 16: public Hello(int value) { 17: this.value = value; 18: title = "Hello"; 19: Hello(); 20: } 21: } and: 30: Hello c = new Hello(5); 31: System.out.println(c.title); What is the result

  1. Hello
  2. Hello World
  3. Compilation fails
  4. Hello World 5
  5. The code runs with no output.
  6. An exception is thrown at runtime
Question 4 Multiple Choice (Single Answer)

Given: 1. interface A { public void aMethod(); } 2. interface B { public void bMethod(); } 3. interface C extends A,B { public void cMethod(); } 4. class D implements B { 5. public void bMethod(){} 6. } 7. class E extends D implements C { 8. public void aMethod(){} 9. public void bMethod(){} 10. public void cMethod(){} 11. } What is the result?

  1. Compilation fails because of an error in line 3
  2. Compilation fails because of an error in line 7
  3. Compilation fails because of an error in line 9
  4. If you define D e = new E(), then e.bMethod() invokes the version of bMethod() defined in Line 5.
  5. If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 5.
  6. If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 9.
Question 5 Multiple Choice (Single Answer)

Given: 1. public class Base { 2. public static final String FOO = "foo"; 3. public static void main(String[] args) { 4. Base b = new Base(); 5. Sub s = new Sub(); 6. System.out.print(Base.FOO); 7. System.out.print(Sub.FOO); 8. System.out.print(b.FOO); 9. System.out.print(s.FOO); 10. System.out.print(((Base)s).FOO); 11. } } 12. class Sub extends Base {public static final String FOO="bar";} What is the result?

  1. foofoofoofoofoo
  2. foobarfoobarbar
  3. foobarfoofoofoo
  4. foobarfoobarfoo
  5. barbarbarbarbar
  6. foofoofoobarbar
Question 6 Multiple Choice (Single Answer)

How many repeaters are maximum possible in an ethernet ?

  1. 2
  2. 8
  3. 5
  4. 4
Question 7 Multiple Choice (Single Answer)

What is the port number for TCP ?

  1. 25
  2. 21
  3. 23
  4. 8080
Question 8 Multiple Choice (Single Answer)

Which layer in OSI model, uses the functionality of RPC (Remote Procedure call) ?

  1. MAC Layer
  2. Network Layer
  3. Presentation Layer
  4. Session LAyer
Question 9 Multiple Choice (Single Answer)

In which layer of OSI model, FTP and telnet are used ?

  1. Application Layer
  2. Transport Layer
  3. Presenstation Layer
  4. Network Layer
Question 10 Multiple Choice (Single Answer)

Which one of the following is used to convert IP Address to Ethernet MAC Address ?

  1. RARP
  2. ARP
  3. NAT
  4. DARP
Question 11 Multiple Choice (Single Answer)

Which one of the following is true regarding TCP and UDP ?

  1. TCP provides virtual circuits and UDP does not
  2. UDP provides virtual circuits and TCP does not
  3. Both will not provide virtual circuits
  4. Both will provide
Question 12 Multiple Choice (Single Answer)

Which layer in OSI model uses BOOTP protocol ?

  1. Network Layer
  2. Presentation Layer
  3. Session Layer
  4. Application Layer
Question 13 Multiple Choice (Single Answer)

Which link is used to transmit the Voice ?

  1. Asynchronous Connectionless
  2. Synchronous Connection-Oriented
  3. Radio waves
  4. UV
Question 14 Multiple Choice (Single Answer)

What is the range of blue tooth devices (without using any transmission cables) ?

  1. 1
  2. 10
  3. 100
  4. >100
Question 15 Multiple Choice (Single Answer)

Blue tooth changes the frequency

  1. 79 times per minute
  2. 1600 times per minute
  3. 79 times per second
  4. 1600 times per second
Question 16 Multiple Choice (Single Answer)

A network will be established, when blue tooth devices are connected to each other. What is this network is called ?

  1. PAN
  2. WAN
  3. Piconet
  4. LAN
Question 17 Multiple Choice (Single Answer)

Blue tooth devices communicates using

  1. Radio waves
  2. Infra red
  3. UV rays
  4. None
Question 18 Multiple Choice (Single Answer)

How many devices can be connected a blue tooth device, which is playing the role of master ?

  1. 1
  2. 7
  3. 8
  4. 16
Question 19 Multiple Choice (Single Answer)

When there are multiple devices connected to each other via Blue tooth, the devices will not intefere with each other. This is because of which methodology ?

  1. Spread Spectrum Frequency Hoping
  2. Distributed methodology
  3. Air sniffing
  4. L2CAP
Question 20 Multiple Choice (Single Answer)

Blue tooth operates at

  1. 2.45 GHz
  2. 2.45 MHz
  3. 2.45 BHz
  4. 2.4 Hz