technology Online Quiz - 1834
A mixed technology quiz covering Bluetooth networking, computer networking protocols (OSI model, TCP/IP), and Java programming fundamentals.
Questions
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?
- It can be any class
- No class has access to base
- The class must belong to the geometry package
- The class must be a subclass of the class Hypotenuse
Which two statements are true about has-a and is-a relationships? (Choose two.)
- Inheritance represents an is-a relationship
- Inheritance represents a has-a relationship
- Interfaces must be used when creating a has-a relationship
- Instance variables can be used when creating a has-a relationship.
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
- Hello
- Hello World
- Compilation fails
- Hello World 5
- The code runs with no output.
- An exception is thrown at runtime
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?
- Compilation fails because of an error in line 3
- Compilation fails because of an error in line 7
- Compilation fails because of an error in line 9
- If you define D e = new E(), then e.bMethod() invokes the version of bMethod() defined in Line 5.
- If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 5.
- If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 9.
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?
- foofoofoofoofoo
- foobarfoobarbar
- foobarfoofoofoo
- foobarfoobarfoo
- barbarbarbarbar
- foofoofoobarbar
How many repeaters are maximum possible in an ethernet ?
- 2
- 8
- 5
- 4
What is the port number for TCP ?
- 25
- 21
- 23
- 8080
Which layer in OSI model, uses the functionality of RPC (Remote Procedure call) ?
- MAC Layer
- Network Layer
- Presentation Layer
- Session LAyer
In which layer of OSI model, FTP and telnet are used ?
- Application Layer
- Transport Layer
- Presenstation Layer
- Network Layer
Which one of the following is used to convert IP Address to Ethernet MAC Address ?
- RARP
- ARP
- NAT
- DARP
Which one of the following is true regarding TCP and UDP ?
- TCP provides virtual circuits and UDP does not
- UDP provides virtual circuits and TCP does not
- Both will not provide virtual circuits
- Both will provide
Which layer in OSI model uses BOOTP protocol ?
- Network Layer
- Presentation Layer
- Session Layer
- Application Layer
Which link is used to transmit the Voice ?
- Asynchronous Connectionless
- Synchronous Connection-Oriented
- Radio waves
- UV
What is the range of blue tooth devices (without using any transmission cables) ?
- 1
- 10
- 100
- >100
Blue tooth changes the frequency
- 79 times per minute
- 1600 times per minute
- 79 times per second
- 1600 times per second
A network will be established, when blue tooth devices are connected to each other. What is this network is called ?
- PAN
- WAN
- Piconet
- LAN
Blue tooth devices communicates using
- Radio waves
- Infra red
- UV rays
- None
How many devices can be connected a blue tooth device, which is playing the role of master ?
- 1
- 7
- 8
- 16
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 ?
- Spread Spectrum Frequency Hoping
- Distributed methodology
- Air sniffing
- L2CAP
Blue tooth operates at
- 2.45 GHz
- 2.45 MHz
- 2.45 BHz
- 2.4 Hz