This is the code:  private static Point c; //c.set(1,1); -&gt; error: "cannot resolve symbol set"?? . . .      @Override         public boolean onTouchEvent(MotionEvent event){             switch (event.getAction()){                 case MotionEvent.ACTION_DOWN:                 case MotionEvent.ACTION_MOVE:                     c.set((int)event.getX(),(int)event.getY());             }             return true;         }   When I touch anywhere on the screen the app crashes and I get the following error:  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Point.set(int, int)' on a null object reference
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?
Applying Zorn's Lemma to natural numbers Zorn's Lemma states that if every chain $C$ in a partially ordered set $X$ has an upper bound then there is at least one maximal element in $X$.  Let $n\in \mathbb{N}$, $C_n \subset \mathbb{N}$ be the set containing the natural numbers $\{1,\dots,n\}$. Then if $k\le n$, $C_k\subset C_n$, so $C_n$ is a chain. Also, $C_n$ has an upper bound, such as $n+1$. But what is the maximal element of $\mathbb{N}$?  There's something I don't get in Zorn's Lemma statement. Why "be king", not "be a king"? I've heard people say "be king" (as in "I can't wait to be king") in movies and TV. Why don't they say "be a king"? Which is correct? What is the easiest way to resolve apt-get BADSIG GPG errors? I frequently cross this issue, and always have to google for an answer. Does anyone have a permanent fix for BADSIG errors from apt-get?     W: GPG error:    lucid   Release: The following signatures were   invalid: BADSIG 54422A4B98AB5139   Oracle Corporation (VirtualBox archive   signing key) Moving status bar in iOS 7 Selecting text in profile activity comments causes unexpected clipping Changing permissions on serial port Do I say "I study computer science," or "I study Computer Science"? Similarly, "I really liked that computer science course," vs. "I really liked that Computer Science course." Office 2016 Advanced Setup Scenario description  Lets assume both containers have a capacity of 300 litres.  One is a vertical tube  as shown in pic 1  Other one is more or less a V shaped containers as shown in pic 2  Both are at ground level  Question  No doubt that whole weight of 300 litres will act on the base of the tube (pic 1). But will the weight of the whole 300 litres act on the base of the container as shown in pic 2?  I.e if you keep both the containers on a weighing scale, for sure, it will show a weight of approx. 300 kg each.  But what I'm asking is whether the weight of whole 300 litres acts on the base of container 2 (since the container's walls are slanting, as opposed to the walls of the tube in pic 1).  If the whole weight will not act on the base of the container, can you state the reasoning and also the principle, so that I can further get to know about it?  Pic 1             |         |                    |         |            |         |            |         |            |         |            |         |            |_________|   Pic 2           \              /           \            /            \          /             \________/ If I select a feature and run self.iface.actionIdentify().trigger() it will open the identify window but won't open the selected feature's data, how can I make it open the data of the selected feature? Where can I find the restrictions and easements that apply to a given UK Rail Ticket? UK rail ticketing isn't always the simplest thing in the world, but the basics aren't too hard to learn. There are  tickets valid at any time of the day, those available only outside of peak hours (typically after 9 and perhaps not in the evening rush hour), tickets only available at quiet times, tickets valid only on one train. These are mostly, but not always, valid in flavours of single (one way), day return (out and back the same day-ish), and (period) return (out on a given day, back within a month). That's it broadly, but you'll notice there's a bit of variation in even just those...  Next up, there are rules on what sort of route you can take. These largely revolve around , not doubling back, direct trains normally being fine, and not taking too long a route if there's a choice. (There's a whole art to making the most of that though, but this isn't the question for that!)  On top of all that, certain routes and/or stations will have additional restrictions, or easements where default restrictions are lifted. For example, one station might be in an area where the default rule is "off peak tickets valid after 9am", then has an additional restriction "off peak tickets to London only valid on trains arriving after 10am", and an easement "off peak tickets to stations along the insert line name here valid after 08:45".  By looking up these restrictions and easements, it's sometimes possible to save money on your journey. In the example above, you might assume you'd need a peak time ticket to travel on the 08:54 to a station along the local branch line, but the easement actually allows you to travel on a cheaper off-peak ticket instead.  How do you go about looking up what easements apply to a given ticket for a journey, and equally what extra restrictions (eg evening peak times or not-valid-via) apply? I've heard that i can travel to the US any time before my tourist visa expiry.  Is that true?  (please advise) I can buy Dell Latitude E7270 through my employer. It will come with Windows, but I would like to install Ubuntu (most likely 14.04). This model does not appear on the list of certified hardware, however. Does anyone know whether I should anticipate any problems with his laptop? Thanks! Suppose I have a directory structure as follows  test test/a test/b   Now I want to execute a command, such that in the . folder I can execute a command on the basename of the files a and b.  So basically, I want something like this, which I naively tried  find test -type f -exec touch `basename {}` \;   Only, this does not result in empty files a and b in the parent directory. Suppose that my touch command can only take a single argument.  This will result in a directory structure like this  a b test test/a test/b   I know how to do this in a bash script, but I am interested in single command solution. Is it correct to use "their" instead of "his or her"? I took an English assessment test online and this was my answer:     Someone suggested to go for a walk.   My answer was wrong and this was the correct sentence:     Someone suggested going for a walk.   Can someone please explain why my answer was wrong? I am new to blender. Pressing &#9096; Ctrl&#9095; AltQ opens the quad view. How to maximize any one of the four views of the quad view? Need help disabling imessage? I recently changed from iphone to android and i have been having trouble recieving messages from my iphone friends since my iphones screen is broken i cant do anything on it. Any way to fix this problem through icloud or something? How can I install Windows after I've installed Ubuntu? How to enable touchpad? Yesterday, suddenly my touchpad on my MSI Laptop started to not respond. In other words, in Login screen, touchpad is working as expected. However, in Desktop screen, after I have logged in, touchpad is not working.  How can I enable touchpad in Desktop?