« first day (2948 days earlier)      last day (1988 days later) » 

12:00 AM
"The man who has confidence in himself gains the confidence of others." -Hasidic Proverb (source)
 
 
5 hours later…
4:57 AM
dreams of electric sheep
 
 
2 hours later…
7:11 AM
Hello all!
 
@DarshitPatel Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
 
Can someone let me know in which scenarios would you use Abstract Class over Interface and otherwise?
 
7:24 AM
@DarshitPatel Interfaces don't have state and (up until Java 8) no code.
Most people prefer interfaces over abstract classes, if there is a choice.
 
Yes, but in what use cases would I use either of the one?
 
72
Q: Abstract class vs Interface in Java

Java GeekI was asked a question, I wanted to get my answer reviewed here. Q: In which scenario it is more appropriate to extend an abstract class rather than implementing the interface(s)? A: If we are using template method design pattern. Am I correct ? I am sorry if I was not able to state the quest...

 
7:40 AM
A class can extend no more than one abstract class, but can implement a very large number of interfaces.
 
Hey guys, I was just wanting to know how I can store a primitive value (int in my case) in a HashMap?
or at least a workaround
 
Basically if your class is an object, the abstract class it extends should be a broader version of it, and the interfaces should be what the implementing class should be capable of.
@JacobSchneider use Integer instead
 
as a constructor?
cool
Got it thank you!
 
@JennaSloan thank you!
 
@JennaSloan Makin' a name for yourself huh? nice work!
 
8:13 AM
guys just downloaded mysql
not working
thats how we do it in school idk
can someone help?
gotta make a mysql java connectivity project
 
8:26 AM
@MartianCactus did you try the \help ?
 
cant really make sense of it
 
Also I think you need a user before you can make a database
 
all we had to do in school was to give the password and then create a database
how do i login? I did create a user in the installation
 
Seeing how that screenshot of yours has "JS" in a yellow box, I think you're in JavaScript mode. Based on what I read here I think you have to type \sql to change it to SQL mode.
Also, this isn't the SQL room
 
oh ok thx man
 
8:59 AM
also guys just downloaded netbeans adn its just blank
and*
when i click new project nothing happens
the notification says "unexpected error"
 
 
2 hours later…
11:20 AM
can anyone he;[?
help*
 
12:00 PM
The most expensive price ever for a sushi-grade bluefin tuna was $1.8 million for a 222-kilogram fish in Japan. Over 80% of the world's declining tuna stock are eaten by the Japanese. (source)
 
 
2 hours later…
1:44 PM
is there some neat library that abstracts common commands to use in different environments?
for example, I want to use linux' locate command, but the target might be running windows, or something else
what do I do?
maybe there's just specific libraries I need to look for, in all things I want to use
but as java boasts being platform-independent, someone probably made a library to abstract away a lot of that
here's some context: the uni gave us students an assignment, about making a text-based adventure game, with rooms, item carrying, and all. We can come up with our own story and everything, as long as we at least implement features out of a list.
Now, I'm a good guy and I don't want the lecturer to be bored, so I'm thinking of creating a genuine experience. The game will be a horror. It will start by cringeing out the player because of the sheer amount of cliches, but in the background, it will look for password/config files, and once the game gets boring enough, the user will be displayed w
then the game will claim that it started a daemon, and advise the user that if they close that interface, the daemon will upload the information to the internet. Once the user is panicking and types "I understand", a countdown will begin, and they'll have to solve a sequence of fairly easy puzzles
now, the game won't actually send the information to the web, but I want the player to feel genuine terror
 
Unfortunately I couldn't find a library by a rudimentary google search, but this would be useful for you I guess: baeldung.com/run-shell-command-in-java
@towc
 
sure, but that's heavily target-dependent :/
 
Yeah :(
You can check the target though
 
2:00 PM
I guess I could implement some targets myself. Plenty that could go wrong, and would require testing on multiple machines/virtual machines, and that seems like a bit too much effort for a simple assignment
 
Might as well ask the professor what OS he/she uses
 
the marking isn't done only by the professor
but the markers might be using the same system, so I guess I can ask that
but if they do, there won't be much sensitive information on them :/
I guess browsing history and password cache would still be available
 
AFAIK there is no such thing as a file for password (?)
Config files, sure
 
I think they're stored in an "encrypted" sqlite db, for firefox
along with cookies
I'd need to do some more research on how to actually get them. Maybe the browsers have some neat preventions
lol, username/password pairs with urls are stored in plaintext for opera
same for chromium
damn
cat .config/chromium/Default/Login\ Data
for firefox, it looks like there's some minor level of encryption, at least:
cat .mozilla/firefox/r4nd0mch4rs.default/key4.db
or maybe it's just sqlite's format
 
 
2 hours later…
4:37 PM
@JacobSchneider Do you want to pay by credit card or PayPal?
 
5:30 PM
Hi, does anyone know whether it's possible to reverse a String while being restricted to streams and completing the return statement of str.chars() ...? My first instinct to doing questions like this would be starting from IntStream because Streams are not really well-versed in knowing about other elements in other positions. To do so, have to read from the List/String but that only works if there isn't duplication elements in the List.
 
6:21 PM
nvm I got it ...good old reduce
 
Hello ! String.valueOf(xx), gets the "params of it" not the text?
 
@Adrian Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
 
All clear now ;)
 
 
4 hours later…
Zoe
10:49 PM
@Michael as your lawyer, I highly recommend using Bitcoin instead. /s
@MartianCactus use IntelliJ or eclipse. NetBeans < Eclipse <<<<<<<< IntelliJ
 
11:16 PM
IntelliJ has too many syllables in its name though; that's why you should use Eclipse instead.
 
11:27 PM
Or you could just use a text editor and a shell
 
Ram
I am getting an error in my JavaFX program that seems random when filtering a treetableview, should I try to incorporate Platform.runlater to update the UI or is it obviously not the solution?
 
@Ram Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
 

« first day (2948 days earlier)      last day (1988 days later) »