Skip to content
Advertisement

Tag: arrays

Output is not showing for second array in Java

I’m a beginner in Java programming and I created a program that accepts 10 numbers as input from users and prints them. The first section is using for loop and the second section is using while loop. The first section works properly and the second section isn’t displaying output. Could anybody help me? } Answer You are not resetting variable

How to push/get data from Firebase and add to a bidimensional array using Java?

I already have TOPSIS algorithm that can calculate data from an array[][]. Now I’m going to use the data from: dummy data: to database’s data My Item_pc.class Condition: I can get data from firebase using arraylist I can calculate data using dummy array with TOPSIS algorithm problem : how to calculate data from firebase with TOPSIS algorithm? I have trouble

Appending column at the end of a csv file java

I have a csv file and I have some data in it and I want to append a column in it. e.g: I want to append that Marks Column through code. The problem I’m getting is The data is getting written 2 times and also the on the first column (Except the first one). How can I prevent it from

Using “put” method of JSONObject in for loop (java)

I’m trying to use JSONObject’s put method in for loop. But I’m not getting Expected output. Expected output: OutPut I’m getting: here is my code: Answer Have you tried moving the construction of infoObj inside the loop. By having it outside, you’re maintaining state across loop iterations. I suspect you’re just updating the same json object each time and adding

Advertisement