« first day (4437 days earlier)      last day (728 days later) » 

00:00
Between infinite and short there is a big difference. -- G.H. Gonnet (source)
 
7 hours later…
07:02
uses java.util.Hashtable
 
4 hours later…
10:52
Do you have any idea why it doesn't work? If so, please feel free to share your thoughts on that! I know it's a bit overcomplicated for the task at hand (which you may take a look at here: https://www.codecademy.com/courses/learn-java/lessons/2-d-arrays-java/exercises/combining-traversal-and-conditional-logic), but I wanted to use the Math.abs() method. I imported the Match library correctly, to the best of my knowledge (java.lang.Math.*;)

for(i = 0; i < newImage.length; i++){
j = 0;
for(j = 0; j < newImage[i].length; j++){
The errors are

Combining.java:39: error: <identifier> expected
System.out.println(Arrays.deepToString(newImage));
^
Combining.java:39: error: <identifier> expected
System.out.println(Arrays.deepToString(newImage));
^
2 errors
11:06
Bonus question: why does Java need chars if you can have one-character Strings?
posted on December 16, 2022

11:54
Madara Uchiha completed part 1 of day 8! \o/
@SergeyZolotarev because strings are just arrays of chars
chars are rarely used, they are more like lower level data imo
12:13
@Wietlol what does the char class exist for in the first place if Strings can do the job?
because strings cannot do the job
@Wietlol you can have one-character Strings, can't you?
yes, you can
but that doesnt mean that the string can do the same job as a char can
@Wietlol could you please give an example when a one-character String is not fit for the job?
rendering
chars can be rendered, printed, etc
although usually, overloads exist so allow you to specify a string to be printed
but generally speaking, the job is usually meant for a char
the string is just treated as a collection of chars
so the question is similar to "why does int exist if a one-item IntList can do the same job?"
12:24
Madara Uchiha completed part 2 of day 8! \o/
Why does %d stand for integers? One would think %i would make more sense 🤔
 
9 hours later…
21:05
posted on December 16, 2022

archive - contact - sexy exciting merchandise - search - about ← previousDecember 16th, 2022nextDecember 16th, 2022: That's it for 2022, here at Dinosaur Comics Dot Com (that address works too!) Thank you all for all your support this year - this remains the best job in the world, and despite it all I've gotten to do it for 19 years running. YOU ARE THE BEST. And hopefully I'll see you

 
1 hour later…
22:19

« first day (4437 days earlier)      last day (728 days later) »