Answer:
Pen Drive offers more accessibility
Not every device is equipped with a CD player but every device has a USB port for a pen Drive. Saving on the pen Drive will therefore enable the data to be more accessible.
Pen Drive has more space.
CDs usually have a storage capacity of below a gigabyte whilst pen drives can reach up to 2 terabytes thereby offering exponentially more space to save data.
Safety of Data
CDs are more prone to damage as data could be lost if the CD is scratches. Pen Drives on the other hand are encased in an outer case that protects the data.
Answer:
The explanation for the following question is described in the explanation section below.
Explanation:
Even though TCP seems to have no authentication, if an applicator decides to transfer its signals or messages to some other mechanism that can encrypt them, instead Transport Layer is perhaps the layer where encryption was located.
- This layer protection is an acceptable use policy that promotes security and authentication when exchanging information.
- TLS would be the authentication protocol where authentication is done whenever the sender wishes to transfer his information to another mechanism that can encrypt itself.
Answer:
Could you post the full question please
Explanation:
Here is my solution. I did the following:
- changed the setRemover into a constructor, since the comment seems to hint that that is expected.
- changed the lookFor type into a String, so that it can work with the string replace overload. That's convenient if you want to replace with an emtpy string. The char type won't let you do that, you can then only replace one char with another.
- Added a static Main routine to use the class.
import java.lang.System.*;
public class LetterRemover
{
private String sentence;
private String lookFor;
public LetterRemover() {}
// Constructor
public LetterRemover(String s, char rem)
{
sentence = s;
lookFor = String.valueOf(rem);
}
public String removeLetters()
{
String cleaned = sentence.replace(lookFor, "");
return cleaned;
}
public String toString()
{
return sentence + " - letter to remove " + lookFor;
}
public static void main(String[] args)
{
LetterRemover lr = new LetterRemover("This is the tester line.", 'e');
System.out.println(lr.toString());
String result = lr.removeLetters();
System.out.println("Resulting string: "+result);
}
}