- Is this the proper way to solve the problem?I solved it with reflection, but not sure if that is acceptable. public static void main(String[] args) throws IllegalAccessException { Solution solution = new Solution(); for(Field f : Solution.class.getFields()) System.out.println(f.get(solution)); }Resolved0
- 0
- Why it is correct? package com.codegym.task.task18.task1821; import java.io.FileReader; import java.io.IOException; public class Solution { public static void main(String[] args) throws IOException { int[] aSCII = new int[128]; try (FileReader reader = new FileReader(args[0])) { whilUnder discussion0
- Tom fordLevel 150
- ШарохLevel 11
- 0
- finally!!Hey guys! Don't forget to import necessary classes from the java.io. package. Plus, if you have a look at the console input you'll see that they passed the age as the first value, and only after that they entered a name. So you have to adapt your code to this order. I hope this will work for you 😊Under discussion0
- SeferiLevel 220
- Where do you input data in Intellij?If you do the project on the website there is a box at the bottom that says Input Data and contains the number 100. Where would that be in Intellij? I can't find it. The only thing I see is at the bottom in Intellij there is "Terminal", but it won't let you input the data for the program. Sorry if IUnder discussion0
- Logic seems OK but can't get final requirement to verifyHi all, So for this one, I think I've got the logic for getFriends correct. It passes the example, and make senses with other values for the index parameter. However, I can't this to verify requirement 4. I may be misinterpretting the meaning of the deep parameter. Help please. Thanks, PhilResolved2
- Chanda B BarrickLevel 8Don't understand what is being asked for setCellColor methodHonestly, I'm not sure I understand what is being asked here: In the drawScene() method, call the setCellColor(int, int, Color) method for each cell of the playing field with the following arguments: x and y coordinates of the cell and any color (for example, Color.BLACK). I thought just had to calUnder discussion0
- AndreiLevel 41Solution I wrote seems OK, yes I receive the error : "The getDistance method must return the distance between the points. " Help please! import static java.lang.Math.sqrt; public class Util { public static double getDistance(int x1, int y1, int x2, int y2) { //write your code here double a = (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1); Math.sqrt(a); return a; } public static void main(String[] argsResolved0
- DyritsLevel 22Why is it not working ?Determine why the program found more instances of the word "world " than exist in the file. public class Solution { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String fileName = readerResolved0
- Can someone tell me what did i do wrong? The output returns the right min numbers (1, -3, 3 and 5) but i still don't complete the last task "The min method must return the minimum numbers a, b, and c." Thanks package it.codegym.task.task02.task0216; /* Minimum of three numbers */ public class Solution { public static int min(int a, int b, int c) { int result; if (a<=b && a<=c) result = a; else result = b; if (b<=c && b&lUnder discussion0