[solved] – Question 71071
Hi
How do I read a list of names from a file- into an array of strings. Once I have the array – h ow do I use a random number generator to shuffle the order and pick 2 students at a time?
Expert Answer
[solved] – Question 7110
How do I convert a stringbuffer into a double in Java?
Expert Answer
[solved] – Question 71129
Database Systems – (Query) I have duplicate invoices and I need to combine the customer balances. How do I write the equation?
Expert Answer
[solved] – Question 71178
Write a Java program to
• create a new array list, add some colors (string) and print out the collection.
• insert an element into the array list at the first position.
• retrieve an element (at a specified index) from a given array list.
• update specific array element by given element.
Expert Answer
[solved] – Question 712
Hi there,
I need to run this code in bluej java but, it wont allow me to. There are no syntax errors and basically im trying to encrypt a java file called “MyFriends.txt”. Please help me out as its quite urgent. Below is my code thanks!
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
public class FileEncrypt
{
public static void main(String[] args) throws Exception
{
byte[] plainData;
byte[] encryptedData;
KeyGenerator keygen = KeyGenerator.getInstance(“DES”);
SecretKey key = keygen.generateKey();
Cipher cipher = Cipher.getInstance(“DES/ECB/PKCS5Padding”);
cipher.init(Cipher.ENCRYPT_MODE, key);
File f = new File(“input.txt”);
FileInputStream in = new FileInputStream(“MyFriends.txt”);
plainData = new byte[(int)f.length()];
in.read(plainData);
encryptedData = cipher.doFinal(plainData);
FileOutputStream target = new FileOutputStream(new File(“encrypted.txt”));
target.write(encryptedData);
target.close();
}
}
Expert Answer
[solved] – Question 71225
Read 10 integers from the keyboard in the range 0 – 100, and count how many of them are larger than 50, and display this result
Expert Answer
[solved] – Question 71247
A studentâs letter grade is calculated according to the following schedule:
Numerical GradeLetter Grade
Greater than or equal to 90A
Less than 90 but greater than or equal to 80B
Less than 80 but greater than or equal to 70C
Less than 70 but greater than or equal to 60D
Less than 60F
Using this information, write C program that accepts a studentâs numerical grade, converts the numerical grade to an equivalent letter grade and displays he letter grade.
Expert Answer
[solved] – Question 71251
The students in your class have a gift exchange at Christmas. Write a structure algorithm to read the name of each students and the description of each gift submitted terminated by “END” and print a gift list for your record
Expert Answer

