I have a program that currently I'm trying to create a player with customizable integers. I use this object:  public class Player {     public String player = null;     private int Strength=0;     private int Defense=0;    private int Magic=0;    private int Resistance=0;    private int Skill=0;    private int Luck=0;     public Player(String name, int int1, int int2, int int3, int int4, int int5, int int6) {        this.player = name;        this.Strength = int1;        this.Defense = int2;        this.Magic = int3;        this.Resistance = int4;        this.Skill = int5;        this.Luck = int6;    } }   I use this main class to run it, and set the integer and string values.  public class Main { public static void main(String[] args) {   Player[] playerList = new Player[] {new Player("Player1", 3, 3, 2, 1, 1, 3),new Player("Player2", 1, 1, 1, 1, 1, 1)};    }   }  However, whenever I attempt to print this, it prints this:Player@659e0bfd I looked through similar questions, but I am not sure where to put the @Override in my program, and if I need to do something different since I have multiple integers, and a string. I only want the string to print out. (Also, is there a way to print out just one part of the playerList, ie. the first section "Player1")
In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]
VB6 IDE cannot load MSCOMCTL.OCX after update KB 2687323 Moment generating function of the inner product of two gaussian random vectors Can anybody please suggest how I can compute the moment generating function of the inner product of two Gaussian random vectors, each distributed as $\mathcal N(0,\sigma^2)$, independent of each other? Is there some standard result available for this? Any pointer is highly appreciated. How can I control HDD spin down time? I have 2 HDDs in my PC. Ubuntu is turning off the secondary HDD very quickly after about 15 minutes, which is short for me. I need to control this time. How can I do it?  I tried GNOME power management but did not find it useful. Is there a way to access wifi in Zurich airport without a phone service? I am traveling through Zurich and have a phone without any roaming there; I'm planning on picking up a SIM once I get to my final destination. Last time I was there, I couldn't access the airport wifi because it required a code sent via SMS.    In the event I need to contact someone or coordinate about flight delays, is there some alternate way to get wifi access? jQuery selector regular expressions Is Ubuntu based on Debian unstable or Debian testing? which of the two it is? Book set in contemporary times about a travel writer who is inducted into the world of the supernatural __NSArrayM insertObject:atIndex:]; object cannot be nil Cannot change backlight brightness Ubuntu 14.04 This morning I found that I cannot change the brightness of my Dell XPs 13 laptop's display anymore. I tried the following to change the brightness   Use keyboard brightness keys Run the commands shown below Boot with kernel option acpi_backlight=vendor. This resulted in a dell_something folder being present in the /sys/class/backlight folder. Changing the brightness file in that folder does not help. Add 'intel_backlight' to xorg.conf Set "load legacy option ROM" BIOS option to enabled and "secure boot" to disabled Boot with kernel option i915.disable-pch_pwm=0 Boot from a fresh Ubuntu 12.04 USB stick installation. I can still not control the brightness. This is strange as the laptop came preinstalled with 12.04. Maybe this a hardware problem? Install latest intel video driver   Any ideas why this broke suddendly? I've upgraded from 12.04 to 14.04 in April and till yesterday the brightness keys were working fine.  Thanks!  echo 100 &gt; /sys/class/backlight/intel_backlight/brightness echo 100 &gt; /sys/class/backlight/acpi_video0/brightness Imagine a battery with the positive terminal connected to ground.  The positive side has a high eletrical potential, ground obviously has a lower electric potential.  Electricity wants to seek a lower potential, and there's no significant resistance between the terminal and the ground.  Shouldn't electricity flow?  I know it doesn't but I don't understand why.  I know you have to close the loop, but why is this necessary? Do spice containers need to be hermetic? Spice containers purchase  I'm planning on upgrading my spice storage. Reading some advice online (e.g. , and ) I came to the conclusion that spice containers should:   Not be exposed to direct sunlight and high temperatures Be airtight   Which means that either you store it inside of some closed cupboard/wardrobe/room or you have containers which do block light and are in a relatively shady place. And the containers need to be airtight.  Available solutions  I've been browsing for some containers available online in my country and the 2 most sensible options I've seen are these:       The problem  The first one is hermetic (it has some rubber around the lid) but it's clear glass. The other one does not have the rubber, just a regular twist-off lid, but it's amber glass.  It'll be hard for me to find any space inside of cupboards to store all of my spices (I need at least 30), so I'd rather buy amber glass container, which I believe will effectively block the sunlight, even when kept on the counter. But I can't find any hermetic amber-glass containers, only ones with regular lid.  The question  Is that regular twist-off lid enough to keep spices airtight and fresh? Or should I focus on buying a hermetic container (like the one in clear glass). I could then for example paint them black to block the sunlight. No Line Break in Author Command? It goes off the page! I was reviewing  for , and noticed that nobody voted to close it, even though the page reports a duplicate.      Why does this happen? When I take the pth root, the bottom of the p comes very close to the \sqrt symbol.  In the New Century Schoolbook font (which I am using), the p actually intersects the \sqrt symbol, which looks even more terrible.  Is there a clean way to fix this?  \documentclass{article} \usepackage{fouriernc} % use the New Century Schoolbook font \begin{document} When I write $a^{(1/p)}$ as $\sqrt[p]{a}$, the bottom of the $p$ touches the top of the root symbol, which looks ugly. Even when the root symbol is larger, such as with $\sqrt[p]{\frac{1}{n}}$, it still looks bad (since the tail of the p almost hits that line). \end{document} Is there a vendor for animal parts? I'm looking to upgrade all my pouches, but some animals are hard to find, or the part needed drops rarely.  Is there a merchant somewhere that sells them outright? I have shards to spare. Accessing Email logs using REST or SOQL What can cause a question to be bumped? What can cause a question to be "bumped" to the first page in the Active tab of a Stack Exchange site? (Changing the "Last Active" date.)  . The arrival of Minecraft Beta 1.5 brought weather conditions. However, it can at times be inconvenient when you're trying to screenshot something and show it off (as it reduces lighting and obstructs your view slightly). Is there anyway to turn weather off?  Alternatively, is there a way to speed up the duration of weather or "skip" it? facl ignoring the "x" permission but only on files How to open the default webbrowser using java