public class HelloWorld{   class Student { int marks;  }   public static void main(String []args){  Student studentArray[] = new Student[2]; studentArray[0].marks = 100; studentArray[1].marks = 75;  int m=0; m = studentArray[0].marks;  System.out.println(m);       } }   This compiles with no problem but when I execute it, I am getting null pointer exception error as following:      Exception in thread "main" .lang.NullPointerException at   HelloWorld.main(HelloWorld.java:13)   can somebody help me to locate where the cause is?
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?
How do I control Macbook volume when a DP display is connected? When I plug my Mac  into a DisplayPort monitor that has loudspeakers, the Mac's volume controls become disabled.    Is Apple assuming that if I have external speakers I am so much better using their own volume control that I have to be forced to do it?   That is annoying because the monitor's volume controls are buried in terrible menus accessed by terrible buttons on the back of the monitor.  Also, if I am inside an app where I can select the audio device and I select the Mac's internal speakers, the volume controls are STILL disabled.  Is there no way to control the volume of an app when an external speaker is connected even if the app is not using the external speaker?????  Some additional info: It's a Macbook Pro 13" 2018 version.  Using a Thunderbolt to Displayport cable, plugging in to a Dell monitor with speakers.    In another location I use the same cable to plug in to Dell monitors with Displayport but without built in speakers in the monitors.   At that location the volume controls remain active and they control the internal speaker in the laptop as they should. Synchronize Clocks I need to develop a system where there are 4 sensor boxes powered by USB and they have their internal clock. Each of these boxes are connected to a Linux pc and all these PCs are linked with WiFi. API of the sensor box allows me to read their internal precision clock (uSec accuracy).   I like to synchronize all four clocks of the sensor boxes as close as possible. Hopefully within a few micro seconds of each other and compensate for drift over time. The idea is to use the sensor data that is collected at the same time (The data I receive is time stamped with the boxes' internal clock). The latency on usb bus, WiFi, pc timing are all indeterministic.  Is this possible given my setup? How do I get the path and name of the file that is currently executing? Is it possible to use the animals that are summoned using Conjure Animals as mounts?  As an example: Summoning Giant Eagles to carry a group up the mountain or over a wall. I'm being forced to use my Macbook more and more with my metered 4G connection. I really need to keep data usage limited. Windows has an  mode which really helps with this.   What's the best way to handle this issue in the OSX world? Perhaps some use of the firewall? Is there any sort of logging happening as to what is using the network?  Thanks for your help :-) Multiple chrome.exe processes in Task Manager I know that each new tab on Google Chrome have its own process, but I have 14 chrome.exe processes running actually as I can see it on the Task Manager, and only two tabs are opened on Google Chrome.    Could it be due to Chrome extensions? What other reason can open more chrome.exe process and how to avoid it? Is there a way to assign a value to a variable, that value which we get in terminal by writing any command?  Example command: sensors  From that we get CPU temperature. How can I assign this value to a temp_cpu variable? Is my MAC address public when browsing the Internet? Best way to obtain clarifying information when reputation doesn't allow comments? TikZ: Named nodes in nested `pic`s I am using the new TikZ/PGF 3.0 pic feature.  I use them heavily, including using a pic inside another pic.  The problem is that Tikz sometimes cannot find the node names of nested pics.  I expect the following to work:  \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \tikzset{complex/.pic={   \node(re) {re};   \node[right=0mm of re](im) {im}; }} \tikzset{su3v/.pic={   \path pic(c0) {complex};   \path pic[right=1mm of c0im](c1) {complex};   \path pic[right=1mm of c1im](c2) {complex}; }} \tikzset{spinor/.pic={   \path pic(v0) {su3v};   \path pic[below=2mm of v0c2re](v1) {su3v};   \path pic[below=2mm of v1c2re](v2) {su3v};   \path pic[below=2mm of v2c2re](v3) {su3v}; }}  \path pic {su3v};       % Works \path pic(name) {su3v}; % ! Package pgf Error: No shape named namec0im is known. \path pic {spinor};     % ! Package pgf Error: No shape named v0c1im is known. \end{tikzpicture} \end{document}   What is wrong here? I have the following page (deadlink: http://www.workingstorage.com/Sample.htm ) that has a footer which I can't make sit at the bottom of the page. I want the footer to  stick to the window bottom when the page is short and the screen is not filled, and stay at the document end and move down as normal when there is more than a screenful of content (instead of overlapping the content).  The CSS is inherited and befuddles me. I can't seem to change it properly to put a minimum height on the content or make the footer go to the bottom. Change the order of integration in:  $$\int_0^{2a}\int_0^\sqrt{2ax-x^2}\frac{\phi'(y)(x^2+y^2)x }{\sqrt{4a^2x^2-(x^2+y^2)^2}}dxdy$$ and hence evaluate it.    I changed the order of integration and got the limits $y=0$ to $a$ and $x=a-\sqrt{a^2-y^2}$ to $a+\sqrt{a^2-y^2}$. I then tried changing to polar coordinates, but it is only making the integrand more complex. How can I install Skype on 32-bit Ubuntu 14.04? Can a Tourist from a VWP country carry (Rent/ Borrow) a gun in say Florida Looking to find out if it is legal to borrow or rent a gun from an individual(s) or company to use to either visit the various gun ranges or wildlife hunting in Florida.  I have a shotgun licence in the UK for hunting etc... but looking to do something similar in Florida without falling foul of any gun carrying laws in transit to any gun range or hunting area?  I know various friends in the US that would lend the guns while there but are they required to be with me while attending any event? Basically not looking to be tethered to any third party... In a Feistel cipher structure, what exactly does the "round function $F$" do? In a Feistel cipher structure, what exactly does the "round function $F$" do to the right half of the data, before taking XOR of the output with the left half of the data? What material fills the synaptic cleft? Is it water? The synaptic cleft is the gap between the pre-synaptic and post-synaptic neurons, and neurotransmitters are transferred between the neurons within this region. What substance exits in this space, is it water? If so, what force makes the neurotransmitters move toward the receptors despite colliding with water molecules? If no spell can reawaken the dead, how did the resurrection stone work? Dumbledore himself said that no spell can reawaken the dead. Isn't that the main objective of the resurrection stone? If one can't reawaken the dead then what is the use of the stone? Surely then one of the Hallows is flawed? I had a Minecraft world on Minefold.  I archived my Minecraft world just before Minefold closed about a year ago.  I'm trying now to open the world in my local Minecraft installation on OS X, but it doesn't show up in the worlds list.  To import it, I simply unzipped the archive from Minefold into my ~/Library/Application Support/minecraft/saves folder.  I'm running Minecraft 1.8, and I don't have any mods installed.  There's no error; the world just doesn't show up in my list of worlds after I click [Singleplayer] (or [Multiplayer]).  Now, the big clue is that the directory structures are different between my locally-created worlds and the world created on Minefold, but I can't figure out how to adapt the files to make them match:  This is a screenshot of my saves folder. I've circled in blue "local" and "minefold", which contain data files for the local and Minefold worlds, respectively.    I bracketed similar filenames in both worlds, but I'm flummoxed in that the Minefold version has three (3) sets of data files, whereas the local world has only one (1) set of files (even though I have visited Nether in the local world).  How do I load my old Minefold world locally? Comments must be at least 15 characters long, which is supposed to make comments like &quot;...&quot; impossible to submit. This works fine, however, there is a way around this, by using comment replies, even &quot;fake&quot; ones e.g. &quot;@somelongname ...&quot;. Can the system strip the comment reply part (e.g. &quot;@somelongname&quot;) before performing the minimum characters check? Proof of Convergence: Babylonian Method $x_{n+1}=\frac{1}{2}(x_n + \frac{a}{x_n})$