Java4630r-Review
∗R.G. (Dick) Baldwin
This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License 4.0†
Abstract
This module is one in a collection of modules designed for teaching INEW 2338 Advanced Java (Web) at Austin Community College in Austin, TX. This module contains review questions and answers keyed to the module titled Java4630: The InetAddress Class in the Network Programming sub-collection.
1 Table of Contents
• Preface (p. 1) • Questions (p. 1) · 1 (p. 1) , 2 (p. 2) , 3 (p. 2) , 4 (p. 2) , 5 (p. 2) , 6 (p. 2) , 7 (p. 2) • Answers (p. 4) • Miscellaneous (p. 5)2 Preface
This module is one in a collection of modules designed for teaching INEW 2338 Advanced Java (Web) at Austin Community College in Austin, TX.
This module contains review questions and answers keyed to the module titled Java4630: The InetAddress Class1 in the Network Programming sub-collection.
Once you study that module, you should be able to answer the review questions in this module.
The questions and the answers in this module are connected by hyperlinks to make it easy for you to navigate from the question to the answer and back again.
3 Questions
3.1 Question 1 True or False?
The Java InetAddress class can be used to nd the IP address corresponding to a domain name . Go to answer 1 (p. 5)
∗Version 1.2: Mar 9, 2014 8:51 pm -0500 †http://creativecommons.org/licenses/by/4.0/
True or False?
Many hosts have multiple IP addresses. To accommodate this, the InetAddress class provides a method named getByName that can be used to get an array of references to InetAddress objects representing IP addresses assigned to the host.
Go to answer 2 (p. 5) 3.3 Question 3
True or False?
The getByName method of the InetAddress class returns a reference to an InetAddress object representing the host whose domain name is passed as a parameter to the method.
Go to answer 3 (p. 5) 3.4 Question 4
True or False?
The getLocalHost method of the InetAddress class returns a reference to an array of InetAddress objects representing all of the computers on the local area network.
Go to answer 4 (p. 4) 3.5 Question 5
True or False?
There is a one-to-one correspondence between IP addresses and domain names. Go to answer 5 (p. 4)
3.6 Question 6 True or False?
Every computer on the Internet must have a unique IP address, but multiple computers can have (or can respond to) the same domain name.
Go to answer 6 (p. 4) 3.7 Question 7
True or False?
The computer that you are using to read this module online also has an IP address and a name. The IP address, the name, and perhaps some other things as well are grouped together under something commonly referred to as localhost . In other words, the IP address of your localhost is the IP address of the computer that you are using to read this module.
Go to answer 7 (p. 4)
What is the meaning of the following two images?
4 Answers
4.1 Answer 7 True. Go back to Question 7 (p. 2) 4.2 Answer 6 True. Go back to Question 6 (p. 2) 4.3 Answer 5False. There is not necessarily a one-to-one correspondence between IP addresses and domain names. In fact there can be a many-to-one correspondence between the two.
4.5 Answer 3 True.
Go back to Question 3 (p. 2) 4.6 Answer 2
False. Many hosts have multiple IP addresses. To accommodate this, the InetAddress class provides a method named getAllByName that can be used to get an array of references to InetAddress objects representing all (or at least some) of the IP addresses assigned to the host.
Go back to Question 2 (p. 2) 4.7 Answer 1
True.
Go back to Question 1 (p. 1)
5 Miscellaneous
This section contains a variety of miscellaneous information. note: Housekeeping material
• Module name: Java4630r-Review • File: Java4630r.htm
• Published: 03/08/14
note: Disclaimers: Financial : Although the Connexions site makes it possible for you to download a PDF le for this module at no charge, and also makes it possible for you to purchase a pre-printed version of the PDF le, you should be aware that some of the HTML elements in this module may not translate well into PDF.
I also want you to know that, I receive no nancial compensation from the Connexions website even if you purchase the PDF version of the module.
In the past, unknown individuals have copied my modules from cnx.org, converted them to Kindle books, and placed them for sale on Amazon.com showing me as the author. I neither receive compensation for those sales nor do I know who does receive compensation. If you purchase such a book, please be aware that it is a copy of a module that is freely available on cnx.org and that it was made and published without my prior knowledge.
Aliation : I am a professor of Computer Information Technology at Austin Community College in Austin, TX.