Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please rewrite this code as Pseudo-Code,.. basically rewrite the code but in english language , Thank you so much! Example : if(5 > x) should

please rewrite this code as Pseudo-Code,.. basically rewrite the code but in english language , Thank you so much!

Example : if(5 > x) should be like if(5 is greater than x)

import java.util.Arrays; import java.io.BufferedWriter; import java.io.BufferedReader; import java.io.FileWriter; import java.io.FileReader; import java.io.IOException;

class WriteToFile{ /*Static method to write data to file from Array */ static void writeArray(String filename,int[] array) {

FileWriter fw = null; BufferedWriter bw = null; try {

fw = new FileWriter(filename); bw = new BufferedWriter(fw); bw.write(Arrays.toString(array));

System.out.println("Done");

} catch (IOException e) {

e.printStackTrace();

} finally {

try {

if (bw != null) bw.close();

if (fw != null) fw.close();

} catch (IOException ex) {

ex.printStackTrace();

} } } /*Static method to read data from file. if want to add data to array, import JSON library and uncomment the commented code . */ static void readArray(String filename,int[] array) { try { BufferedReader br = new BufferedReader(new FileReader(filename));

String Line;

while ((Line = br.readLine()) != null) { System.out.println(Line); } /* JSONArray jsonArray = (JSONArray) new JSONObject(new JSONTokener("{data:"+Line+"}")).get("data"); for(int i=0; i

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic 4 Ole Database And Controls Superbible

Authors: Michael Hatmaker, C. Woody Butler, Ibrahim Malluf, Bill Potter

1st Edition

1571690077, 978-1571690074

More Books

Students also viewed these Databases questions

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago

Question

=+2 Why are international employment standards important to IHRM?

Answered: 1 week ago

Question

=+1 Why are local employment laws important to IHRM?

Answered: 1 week ago