public class Test {     public char[] reverse(String list) {                    char[] ch=list.toCharArray() ;            for (int i = 0, j = list.length() - 1; i &lt; j; i++, j--) {               char temp=ch[i];               ch[i]=ch[j];               ch[j]=temp;            }            return ch;         }     public static void main(String args[]) {       Test test = new Test();       String a="HELLo";       char[] b=test.reverse(a);                 System.out.println(a);       System.out.println(b);       System.out.println(a+b);    } }   Output: HELLo oLLEH HELLo[C@38462f90  In last s.o.p output is reference while for same vairable b in second s.o.p is string value. Please explain reason
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]
Round function in Excel, worksheet function vs VBA Prove that if $p$ and $p^2+2$ are prime then $p^3+2$ is prime too Do the beacon lighters really live on top of the mountains? Following this image I found online:    Do the beacon lighters really live on top of the mountains?  It seems really cold on top of some of these mountains and there are no villages or whatsoever. I have 2 quartz crystal resonators in my pcb board: 32.768 kHz &amp; 20 MHz. They are connected to a Freescale MC12311 transceiver IC, which has an HCS08 micro-controller embedded in it. I want to test if these crystals are working properly or not.  Available tools: Oscilloscope, Frequency-Meter (Digital Counter), Digital Multimeter.  How should I use these tools to test the crystals in board?   Note: The capacitive load-effect of probes should probably be considered. If not, the measurement would not be accurate, or even worse, the crystals would not work at all.     Edit1: I used both the oscilloscope and the frequency-meter (with x10 probes), but unfortunately there was nothing monitored at all. Is there a device that could measure the speed of time? Is there (or can there be) a device that could measure the speed and acceleration of time? ON an American street, but IN a British one. Do the twain ever meet? In the United States, we say that someone lives on a street, whereas I've noticed that British people say in. For instance:     Bubba lives on Washington Street.   Colin lives in Cavendish Avenue.   I believe we both would use at when a number is given. For instance:     Bubba lives at 16 Washington Street.   Colin lives at 7 Cavendish Avenue.   I don't think it matters if it's a road, avenue, street, circle, or lane — as far as I know, in America, we always live on a street. Does it vary in British English, or is it always in? If it varies, what are the rules? Find the functions $f:\Bbb R_*^+ \to \Bbb R_*^+$ such that:  $$f(x)f \left(\frac{1}{x}\right)=1$$ Ability to update profile from the Stack Exchange Android App Is the git storage model wasteful? Getting GIF and/or moving images into a LaTeX presentation I'm very new to presentations in LaTeX (I've been using PowerPoint for years but have finally converted). I am wondering how to get a GIF into a section. If need be, I can convert a GIF into lots of pictures and have them overlay to give the impression of movement. New York is a great place to live. New York is a great place to live in.  I've seen the former usage a lot and I've started wondering what the grammar aspects of it are. The main question I'm asking involves the grammar when the preposition in the end of the sentence is deleted. Is it equally formal or correct to omit it? What are the grammar properties of this? Some more examples of similar usage:  This organisation is a great place to work. This is a great place to stay/sit/study/travel/go.  Just to show that 'live' isn't special in this case. Note: I'd posted the same question  before, but the answers were not satisfying enough (the answers there did not seem to provide the precise grammar aspects of this, those that could be in a serious grammar book), so I'm posting this here to get some more views on the question. I hope it is acceptable. What happens when I terminate a process and the socket send buffer is not empty? In Windows (and probably in other operating systems), if a process has a TCP connection with another process on another machine, and then I terminate the process, an RST packet will be sent to the other machine to indicate the end of the connection.  Now imagine that when the process is terminated, there were still some data left in the send buffer. What will happen in this case, will these remaining data be sent to the other machine followed by an RST packet, or will these remaining data be ignored and only an RST packet is sent? Why would one limit username format? Many websites when ask you to create a new "username", will limit you in some way, most often like "username should only contain letters and underscores" or something alike.  This results in inability to use my email as username and forces me to come up with new unique string all the time.  What is the rationale behind this?  Why not just let users use their emails, as a simple to remember and always unique?   What is generally wrong with having symbols like *&amp;%$#@ as a part of username? Present-perfect-tense vs. Simple-past-tense I see that Stack&nbsp;Overflow is very Linux specific. Doesn't Unix &amp; Linux and Ask&nbsp;Ubuntu cover much of the same ground? I see that Unix &amp; Linux and Server&nbsp;Fault also cater to many Linux server questions. Similarly, Ask&nbsp;Ubuntu and Super&nbsp;User seems to contain most like questions. What is the difference between find . and /home/user/* as an input to for command.? For example:  for var in $(find .) do echo "$var" done   or  for var in /home/user/* do echo "$var" done   In the first case for command breaks up the file with names containing spaces. While in the second case it does not. Why? I am flying to Tokyo in November, and I have the choice to go direct (paying extra) or transit via Seoul. Is 6 hours transit time enough to leave Incheon airport for a bit to see something of Seoul? It might make my trip more worthwhile to see something of South Korea too. I don't know much about the busyness of the airport around this time, and travel time between the airport and the city, so that's why I am asking. Find a non-negative function on [0,1] such that $t\cdot m(\{x:f(x) \geq t\}) \to 0$ that is not Lebesgue Integrable I think that the question is contained in the title. Suppose we begin from something that is false for example $1=0$. Is it possible using only $\Rightarrow$ (and of course $\lnot ,\wedge,\lor$)  to prove any possible statement? It has been ages since i studied logic at the university so i would prefer a simple explanation (if possible) I use this program in Windows that's one-box and searches all of my drives. By default it lists all files, everywhere, in a single list. Is there a Linux graphical utility that does this?