public class Abc {    public static void main(String args[])    {       def obj=null;       obj.method();     } } class Def {    void method()    {        System.out.println("class def-&gt;&gt;&gt; method()");    } }   The output of this code is generating a NullPointerException and why?
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
$X$ is a topological space with no special properties.  If a space $X$ has no isolated points, then show the same for any dense subset of   $X$.  Thanks a lot. Merging two incoming broadband lines for faster Internet Quantum levitation, flux pinning -- basically, when a superconductor floats above a permanent magnet, is really fascinating. But does the strength of the magnetic field influence the superconductor's height? And what relationship/formula suggests this?  For example, if I had a coil wrapped around a metal object and then ran a small current through it, a small magnetic field would be generated and a superconductor exposed to it would float about it at some height that I put it on.  But what if I increased the current, so that the magnetic field also increased? What happens to the superconductor? Does its height change? Or does it just get harder to "pull out" of its levitating state? How should I structure my URLs for both SEO and localization? When I set up a site in multiple languages, how should I set up my URLs for search engines and usability?  Let's say my site is www.example.com, and I'm translating into French and Spanish. What is best for usability and SEO?  Directory option:  http://www.example.com/sample.html http://www.example.com/fr/sample.html http://www.example.com/es/sample.html   Subdomain option:  http://www.example.com/sample.html http://fr.example.com/sample.html http://es.example.com/sample.html   Filename option:  http://www.example.com/sample.html http://www.example.com/sample.fr.html http://www.example.com/sample.es.html   Accept-Language header:  Or should I simply parse the  header and generate content server-side to suit that header?  Is there another way to do this? If the different language versions don't have different urls, what do I do about the search engines?    UPDATE 2011-12-06  Google has new recommendations for meta tags for explicitly pointing to other language content: .  UPDATE 2012-05-25  Related but not precisely:   UPDATE 2013-06-12  includes discussion of several URL schemes directly relevant to the question. I wanna transfer some files from this PC with Ubuntu to a PC with Windows 7 I don't care how to do it (ftp, samba or whatever) I wanna know the steps, I searched a lot but I can't find anything that works. Thank you. I need to write an article with APA citations. I have sample code that works fine with style=authoryear, but if I switch to style=apa I get the following error message:   Error Line 21 ! Undefined control sequence.&lt;argument&gt; \printdateextralabel   I'm using TexMaker with biber. I've gone through example after example and I can't figure out what's wrong. I suspected it was with TexMaker or MiKTeX, but I just uninstalled and reinstalled both programs and I'm having the same issue. The same error message always pops up with the line number after \printbibliography. I tried copying corrected MWE's from other questions (such as  answered by Alan Munn) and I get the same error.  I included a MWE and my .bib file (borrowed from another thread) below.  File MWE:  \documentclass[article,12pt,letterpaper]{apa6} \usepackage[american]{babel} \usepackage{csquotes} \usepackage[style=apa,natbib=true,backend=biber]{biblatex} \DeclareLanguageMapping{american}{american-apa}   \title{Annotated Bibliography 1} \author{Joe Smith} \affiliation{Spectacular University} \addbibresource{bib.bib}  \begin{document} \abstract{abstract goes here} \maketitle this is a test \cite{Kim1999188} \printbibliography \end{document}   bib:  @article{Kim1999188, title = "Absorption of water vapour into lithium bromide-based solutions with additives using a simple stagnant pool absorber ", journal = "International Journal of Refrigeration ", volume = "22", number = "3", pages = "188 - 193", year = "1999", note = "", issn = "0140-7007", doi = "10.1016/S0140-7007(98)00061-9", url = "http://www.sciencedirect.com/science/article/pii/S0140700798000619", author = "Jin-Soo Kim and Huen Lee and Sun Il Yu", keywords = "Absorption", keywords = "Water", keywords = "Lithium bromide", keywords = "Absorption", keywords = "Eau", keywords = "Bromure de lithium " }      Here is a link to my . Proof that the Earth rotates? What is the proof, without leaving the Earth, and involving only basic physics, that the earth rotates around its axis?  By basic physics I mean the physics that the early physicists must've used to deduce that it rotates, not relativity. Rectangle with cross on title bar I have installed Ubuntu 14.04 and I think that I have found a bug. When I open terminal and  go to edit profile preferences I get a rectangle with a cross on the title bar. It happened with other applications too. Here are the screen shots: how to create a roster sheet in sharepoint 2010 The title word filter is one of the worst ideas ever implemented on SO There are numerous (, , ) questions concerning this problem. I realize this is a borderline duplicate, but I'll re-iterate the futility of this particular filter and why it should be outright removed from Stack Overflow.  Do you know how effective this is in preventing users who just don't care from posting questions with bad titles? 100% ineffective. What do these users do?   Replace it with a synonym: "issue," "trouble," "predicament," "botheration" or what have you. Or worse, they simply work around the filter by deliberately misspelling the word or inserting space or punctuation:    () ?    and the coup de grâce:      I mean, even Jeff . This adds zero value to the title. In fact, it looks worse. Why, oh why are people  to scrap a bad feature? All this does is:   Prevent people who have a  to use the word "problem" in the title from posting questions with an appropriate title. Break the search feature because of workarounds or the need to use less descriptive titles than the error itself   This is an extraordinarily useless (and harmful) feature. Please, for the love of Cthulhu,  remove, eliminate, abolish, eradicate, extirpate this "feature" from Stack Overflow.    Bonus:     So I can't mention the Halting Problem in the title? – Keith Thompson Nov 1 at 19:05      @KeithThompson Maybe it's a "Halting Issue". Or "Need help with Halting". Or the "Halting thing in Computability Theory". – slhck Nov 1 at 19:14 Why is the work done on a charge calculated from infinity? Why is the work done on a charge calculated from infinity to a point? Why not from one particular point to other? What to do about rep inflation? Overall reputation scores are headed nowhere but up.  Pretty soon there will be thousands of mods.  What to do?  Thoughts on possibilities:   Thousands of mods is fine.  Carry on. Adjust the threshold values for high-level SO privileges. Do a straight-up inflation adjustment.  You had x rep, then at the turn of the year we applied the Consumer Rep Index to all scores, now you have (x / inflation) rep. Implement a rep decay mechanism, so that inactivity sheds some of the overall rep that's built up. Suppose the default shell for my account is zsh but I opened the terminal and fired up bash and executed a script named prac002.sh, which shell interpreter would be used to execute the script, zsh or bash? Consider the following example:  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % sudo cat /etc/passwd | grep papagolf [sudo] password for papagolf:  papagolf:x:1000:1001:Rex,,,:/home/papagolf:/usr/bin/zsh # papagolf's default shell is zsh  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % bash # I fired up bash. (See that '%' prompt in zsh changes to '$' prompt, indicating bash.)  papagolf@Sierra:~/My Files/My Programs/Learning/Shell$ ./prac002.sh  Enter username : Rex Rex # Which interpreter did it just use?   **EDIT : ** Here's the content of the script  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % cat ./prac002.sh  read -p "Enter username : " uname echo $uname Can Windows Virtual PC run a 64-bit OS? Where and why do I have to put the "template" and "typename" keywords? The Node Editor won't work for the object selected I'm still learning, but I'm trying to follow a tutorial to apply texture to a model. I only want to apply the texture to one object in the scene, so I selected it, unwrapped it, and painted over it. Now I selected it in the Edit Mode (I can't select it in the Object mode because all is locked together) and went into Node Editor, but the nodes are greyed out.  Why? Do full frame sensors gather more light than crop sensors? Lots of people say that full frame sensors receive more light than cropped sensors. I have never found a proof of this claim so I tried to do the computation by myself, and proved the contrary! Could you tell me if I am wrong ?  We want to compare the same frame with the same depth of field. I'm not concerned by the quantity of photons by photosite, which is unrelated to sensor size but to the density of pixels. I have neglected effects like vignetting or angle effect on the edge of the micro-lens array. Here is my simple reasoning :  If you want the same  α~2arctan(size/2f) with a full-frame sensor and a crop sensor with crop ratio c, you have to multiply the focal length by approximately c. Now, in order to maintain the , the f-number N have to be divided by c. If we measure the "amount of light" with the well defined  Ev provided by the same frame of the same scene (so the  is fixed), we have Ev ~ f/N.  Putting all together, Ev_crop = Ev_ff x c², so the cropped sensor receive more light than the full frame sensor !  For those who are interested in the price of two equivalent systems, one with a FF+50mm+135mm and the other with Crop+35mm+85mm, see this . Curve Bevel function, scale? Is there a way to scale up the bevel object on one end of a curve, a little bit over each point?  I notice the vertex "weight" slider will tweak how much influence each vertex has on the others, is there something like this that can scale the bevel object up a little bit?  Preferably with the option to constrain X,Y,Z independently Can I bake in a convection microwave? I have microwave oven, but I can't bake cakes and cookies in it. So I need an electric oven, but people are suggesting I buy a convection microwave to do both baking and normal microwaving. Will that work? Or do I really need to get an electric oven to bake? I need help with this:  If a is an element of $\mathbb Z_n$ and $\gcd(a,n) &gt; 1$ , then a is not invertible.   First you show that if $a$ is an element of $\mathbb Z_n$ and $\gcd(a,n)&gt;1$, then there  is an element $b$ of $\mathbb Z_n$ and ($b$ is not equal to the zero element) from which $ab = 0$.   The second part I cant get. i.e. show if $b$ is not the zero element  and $ab=0$ then $a$ is not invertible.