There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:Call me lazy, but when I develop some code...first thing I do is to create a method called 'a'...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
There are three kinds of actuaries: those who can count, and those who can't.
jon ninpoja wrote:regarding
private static void a(String s, boolean asterisks) {
if (asterisks) System.out.println ("*****");
System.out.println(s);
}
is this a method? ...what is it?...what would it do? tried compiling it...nothing happened
i know its bad practice but please explain to a newb...
Maneesh Godbole wrote:I don't know if you guys are jesting or serious. Create a method to save typing?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I'm sure Junilu meant it would print:Junilu Lacar wrote:That means a call like a("Hello", true) will print *****Hello
jon ninpoja wrote:i understand boolean asterisks etc...but where is it getting true or false from?
jon ninpoja wrote:yes that was stupid of me...was late...had a long day...sorry
the a method could belong to any class name i know...can a class dog...have a method dog...just out of curiosity...even if it could i know it would be stupid to name things in this way.
There are three kinds of actuaries: those who can count, and those who can't.
jon ninpoja wrote:I...was just looking at this method to see if i could understand it
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|