« first day (2379 days earlier)      last day (2565 days later) » 

12:56 AM
morn
 
 
1 hour later…
1:59 AM
@JennaSloan The first one doesnt have a download link :/
 
But it has a link to a page that links to the download page
 
ill try it
@JennaSloan They didn't work :/
 
 
2 hours later…
4:00 AM
"If you don't have confidence, you'll always find a way not to win" -Carl Lewis (source)
 
 
2 hours later…
user7627726
5:33 AM
hello all
 
user7627726
does anybody else think that there should be like an android-java tag?
 
user7627726
all the posts about android start to bug me
 
user7627726
but if there was a android-java tag, we wouldn't have to dig through android tagged questions
 
personally, I don't
but if you feel like that, you can go to meta and propose it there
 
user7627726
@JennaSloan OMG!!! i love that chart!!! It was like my java mother that taught me to remember what they meant. BEST REFERENCE SHEET EVER
 
5:39 AM
mostly, Android questions that have been answered already by Java-tagged questions are simply closed as duplicates
 
user7627726
but still if you search the java tag for questions, a nice chunk of them are android
 
because people tag them as java I guess
 
user7627726
I think i will propose it to meta
 
search meta before proposing it
it's probably been asked before
 
user7627726
that's true
 
user7627726
5:41 AM
i'll make sure to do a thorough search
 
user7627726
if it is original and gets accepted, you'll know who did it
 
good luck with that!
 
user7627726
6:06 AM
@tavo I just made a proposal. there were similar posts, but they did not have any suggestions for fixing the problem.
 
now wait to see what happens
 
What is the correct way to say the following:
A block of memory ON the heap
A block of memory IN the heap
??
 
in
 
user7627726
hello cookiesoup
 
user7627726
creative name
 
6:14 AM
:)
 
@CookieSoup 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! :)
 
user7627726
@tavo see what oakbot said! If you have an Android question, you're in the wrong place!
 
user7627726
YES!
 
yes, because there is an Android chat room
java and android are NOT the same thing
the problem seems to be that people that post an Android question tag it as both Android and Java
 
6:59 AM
I hate when autoformatting fucks up my cleanly ordered methods >:(
 
They include java tags maybe because they have problem in their java code and not something related to android- specific-java APIs. like people have problem in Threads so they include Java.. but i agree there should be a debate on including Java tag for questions related to AsyncTask or Log class.
 
the debate is there
but none of the proposed solutions pass through creating a joint tag
people's misuse of resources won't be solved by giving them more
people will just use both Java, Android and Java-Android tags at the same time if all exist
 
 
2 hours later…
fge
8:41 AM
Moo
 
8:58 AM
hey, look who's back
hi @fge
long time no see
 
9:22 AM
morning
 
9:43 AM
Morning
 
any bash/yaml folk here? I want to add 2 properties to a yaml file, but only if they have values. IF both have a value, I want the two properties to appear one after the other; on 2 seperate lines. The issue is, they're appearing on 1 line.
 
3 messages moved to Trash
don't post code here
use pastebin, hastebin or whatever other tool is out there
OakBot says it at least 10 times a day
 
it's blocked in my work :(
 
now you have an excuse to change jobs
 
@TheCoder use Tor browser then :p
 
9:56 AM
that's reserved for smut
 
I use it at work but not for smut, just for youtube,twitter,etc
because the f*** companies require this security, whereas, guys that install this security they have opened website
they are not better than us
 
10:11 AM
G'day
 
I need help with this
I'm asked how many times each Statement will run
I don't understand why Statements(B) runs 15 times
 
how many times runs the outer loop?
And good morning :D @CrashBandicoot
 
Good morning
It doesn't specify, it just asks how many times each statement will run
I can understand Statement(A) will run 3 times
 
Or asked differently, how many times is A run?
Exactly
And C?
 
I'm not sure
 
10:23 AM
in which set of curly brackets is it in?
 
the last one
 
So the same in which A is in, right?
 
So it makes sense that the inner loop is run times as well?
 
10:25 AM
And (just looking on that inner loop) how often is B run?
 
5 times
 
And now this loop is run 3 times (because of the outer one)
So 3 times this 5 time loop makes it 15
 
I see
Ok, that makes sense now
And C?
 
Look a bit up in the chat ;)
We had that one already :P
 
Okay
So, because Statement(A) runs 3 times, so does C
 
10:28 AM
yup
 
hence, Statement(B) also runs 5x3
 
Therefore, D should run once?
 
Indeed!
 
Thanks a lot!
There's also some other questions on it...
 
10:29 AM
Aye I just asked stuff :D
@CrashBandicoot What is it about?
 
What would be the values of 'i' & 'j' the 3rd time Statement(B) runs?
I'd have thought they'd be 3
 
How is the program flow of two nested loops?
 
The first one runs, followed by the next
Until the condition no longer is met
 
Right.
What would i be if A is run the second time?
 
Would it not be 1?
 
10:32 AM
Yup
What would i be if B is run the second time?
 
Do not start random guessing
 
Does it reset?
So, it goes back to 0?
 
10:34 AM
What happens in your code:
A is executed
loop with j runs 5 times
C is executed
i is incremented
 
I see
So, the third time, i would be 2
 
No
Because I is not incremented when you are in the J loop
 
I see
 
The third time B is executed, the incrementing of i has not even taken place
 
so it would be i=0 and j = 2
 
10:36 AM
Yeah
 
I see...
I just get mixed up with the basic stuff
Hence the confusion
 
We had to do so called trace tables in the school in computerscience...
You are basically writing the values of the variables down in every line of code executed. Really annoying but for basic stuff it might help
 
I see
I'll look that up
 
HI all
 
Hi @user2713461
 
10:45 AM
when I try Boolean var = 1; it shows error... If I use TRUE instead of 1, it works fine.. Why is this?
 
Which language?
 
@geisterfurz007 java
 
Ah just checked something :D
 
@CrashBandicoot how are you ?
 
@user2713461 Unlike in for example C (I think) in Java you cannot use numbers to express a boolean value
You can use TRUE (which including import is java.lang.Boolean.TRUE) or true.
Same goes for false
And java.lang.Boolean.TRUE basically holds a Boolean with value true, so you can as well go ahead and directly write true :D
 
10:49 AM
@geisterfurz007 oh, thank you :)
 
Glad I could help :)
 
@shyla 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! :)
 
@shyla Please use paste.ofcode.org and remove the above post :) This helps to keep the chat clean
 
@user2713461 I'm good thanks, and you?
 
@geisterfurz007 hey , how to read a single character using Scanner class??
should I have to use Reader class?
 
10:51 AM
@geisterfurz007 Did you say you're in university?
You're very good with Java
 
@CrashBandicoot I am yes
I had some programming experience in school and one full semester of practice now :D
 
May I know where I am wrong its not returning number paste.ofcode.org/Atazhbu8txiFEF986JE456
 
I wish I had that level of understanding xD
 
@user2713461 You mean just read eG the first char from the input string or what do you have in mind?
@CrashBandicoot Will come in the future :)
 
hehe
I hope the near future xD
 
10:53 AM
yes.. the input expected is one character
for ex : Enter 1 to continue, 0 to exit
 
You can use nextInt() if you need one number only. Else you can do next().charAt(0) which will return a char
Note: If you use nextInt() and no number is put in, an exception will be thrown
 
is nextInt() only used in Scanner classes?
 
@geisterfurz007 in this I ll simply waste memory.. Where I expect only one char, why to use int ??
 
@user2713461 Because String is greater :D
 
WHY??
 
10:59 AM
You cannot get only one char (afaik), but either a String or other number classes like Double etc
@user2713461 String is an object and int is well... a primary type
 
even that number can be treated as a single character
int, boolean are all primitive data types , right?
 
yes
If you are not satisfied what I tell you, google...
There are at least 3 questions on stackoverflow having that question as a topic
 
@geisterfurz007 ok.. anyways thank you :)
 
11:16 AM
Does any one know why its not reversing ?
 
fge
@shyla it is not even clear why you say your code is not working, your code sample doesn't even print the resulting array
 
@fge I am getting object address when i print it
i changed it to return
 
fge
Ah, that
Classic error
/javadoc Arrays#toString
 
Which one do you mean? (type the number)
1. org.assertj.core.util.Arrays#toString()
2. java.util.Arrays#toString(long[])
3. java.util.Arrays#toString(int[])
4. java.util.Arrays#toString(short[])
5. java.util.Arrays#toString(char[])
6. java.util.Arrays#toString(byte[])
7. java.util.Arrays#toString(boolean[])
8. java.util.Arrays#toString(float[])
9. java.util.Arrays#toString(double[])
10. java.util.Arrays#toString(Object[])
11. java.util.Arrays#toString()
12. org.assertj.core.internal.Arrays#toString()
 
fge
^^^ use one of these, but for you it will be
3
 
11:26 AM
@fge String toString(int[] a): Returns a string representation of the contents of the specified array. The string representation consists of a list of the array's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (a comma followed by a space). Elements are converted to strings as by String.valueOf(int). Returns "null" if a is ...
null. @since 1.5
 
fge
You need to *print(Arrays.toString(rv))
It is not that your method doesn't work -- it does
It is just that you fell in the the ultra classical trap of "printing" Java arrays
 
I did toString but argument was empty
Thanks
 
11:40 AM
@Dr.Sam Syntax: /learn commandName output
@Dr.Sam Saved.
 
11:57 AM
/learn CrashBandicoot is the Master of the Master
 
@CrashBandicoot Saved.
 
I need some help:
How do you right align data, without using system.out.print(" ")
We all require help at some point in our life
On a serious note though, how do i do it?
 
12:51 PM
helloooooooooooooooooo
 
1:05 PM
Morning, Java!
 
Good night Michael =-=
 
Night? But it's morning!!
 
Its-always-friday
\o/
 
Oh, that's right. Happy Friday, Java!
 
Quick note: Whenever you are stuck there are a few things you can do:
-read documentation
-ask people
-figure out on your own (in some way)
-google (recommended one!)
The more you google, think about how to approach your problem to know what you have to search for, read possible solutions, the more likely it is that you will remember the answer, because you built a connection to that problem.
I sometimes find myself just asking for everything I cannot figure out on my own and if I see it, I start looking on my own.
That is probably not the most effective way, but the most educating I would say
For example when googling "right align text in the console java" this was the first result.
@Michael Happy Friday :D
And no it is morning for sure, but I am heck tired
 
1:15 PM
it's afternoon!
not morning
 
@geisterfurz007 Thanks for the advice!
 
Apr 21 at 8:27, by kiheru
I thought it had been established that it's always morning at the java channel
@Aurasphere ^
 
oh I see... morning then! I just woke up
 
Worked too long on my current project, trying to figure out why it is not working eventhough it should
Above was said or thought at least once by each programmer, I guess :D
 
yeah I was going to reply that xD
I've just realized I probably did a big mistake on managing my maven projects
 
1:18 PM
I updated the shared properties, changed the attribute correctly and it simply stops working...
 
With that link, it states System.out.format("%5d", i*j);
 
O_O Sounds not that good...
 
So, the %5d right aligns
But, why is the i*j still in the format bit?
 
@CrashBandicoot The thing works like this:
You have the String to print with some extra special placeholders (which the %5d is) and then you have (as extra arguments) the values to fill these placeholders
 
I had a domain and used it as a groupId for a public project there (other people can release there) but if I publish my private projects with that groupId, then the people that can publish my public project would be also able to publish my private projects right? facepalm
 
1:21 PM
%d for example is a placeholder for whole numbers
%f is for floats
%s for Strings (I think)
@Aurasphere :D
 
I didn't think that through... I will have to migrate that public project
 
The number shows how many digits/characters are supposed to be displayed where.
so %5d formats the value i*j to 5 digits. No matter if it is longer or not
%.2f formats a floatnumber on 2 digits after the decimal point
 
Ahh
Thanks for the help!
 
Hey guys
 
@jason 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! :)
 
1:27 PM
What is the difference between undirected and bidirectional graph?
 
@jason hi
 
hi
 
by Bidirectional, do you mean Undirectional?
6
Q: What is the difference between a directed and undirected graph

user3492121What is the difference between these fundamental types? In drawings I see that the directed has arrows, but what exactly is meant by these arrows in the directed graph and the lack thereof in the undirected graph?

 
 
6 hours later…
7:35 PM
I hate it when I try to download something but the website is like "You need to install our Download Manager"
"Download the Download Manager"
 
true
 
 
3 hours later…
10:35 PM
How am I supposed to use an enum to add compile-time checking if there's no built-in way of creating the enum using the type your enum corresponds to?

If I can't pull data out of the database and use it to directly construct the enum, then I have no compile-time checking..
 
@CausingUnderflowsEverywhere 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! :)
 
oh mister bot dont chu worry I got some script questions later!
Im definitely missing something..
 
11:04 PM
/javadoc Enum
 
@CausingUnderflowsEverywhere java.lang.Enum: This is the common base class of all Java language enumeration types. More information about enums, including descriptions of the implicitly declared methods synthesized by the compiler, can be found in section 8.9 of The Java™ Language Specification. @since 1.5 (1/2)
 
/javadoc Enum#ordinal
 
@CausingUnderflowsEverywhere int ordinal(): Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero). Most programmers will have no use for this method. It is designed for use by sophisticated enum-based data structures, such as java.util.EnumSet and java.util.EnumMap.
 
11:52 PM
I guess using an enum, if I want to go int to enum I need to define that method so I can force a check in there but it's run-time checking not compile time anyways
 

« first day (2379 days earlier)      last day (2565 days later) »