While executing below code i'm getting NullpointerException.   public class SftpConn       {       public List&lt;String&gt; searchableFields(String sheetName, int column) {               if (sheet == null) {                   sftpConnect();               }               List&lt;String&gt; test=null;               sheet = wb.getSheet(sheetName);               int rowcount = sheet.getLastRowNum();               for (int i = 1; i &lt;= rowcount; i++) {                   Row r = CellUtil.getRow(i, sheet);                   key = CellUtil.getCell(r, column).getStringCellValue();                   System.out.println(&quot;key = &quot;+key);                   test.add(key);               }               return test;           }       }      2.Below is the main class where i'm calling &quot;searchableFields&quot; from searchableFields 3.every time i'm seeing same error please suggest&quot;                 public class MyTest {                 public static void main(String[] args) {                     // TODO Auto-generated method stub                     SftpConn sftp = new SftpConn();                     List&lt;String&gt; list = sftp.searchableFields(&quot;Searchable Fields&quot;, 0);                     System.out.println(list);                 }             }                             Below is my Out put please suggest that what could be the issue.           Session connected  true               key = Check Document                Exception in thread &quot;main&quot; java.lang.NullPointerException                  at com.brcc.tool.Configuration.SftpConn.searchableFields(SftpConn.java:120)                  at com.brcc.tool.Configuration.MyTest.main(MyTest.java:10)   *
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?
\pdfendlink ended up in different nesting level than \pdfstartlink Can you turn weather off in Minecraft? Why do clocks measure arc-length? Apologies in advance for the long question.  My understanding is that in GR, massive observers move along timelike curves $x^\mu(\lambda)$, and if an observer moves from point $x^\mu(\lambda_a)$ to $x^\mu(\lambda_b)$, then his clock will measure that an amount of time $t_{ba}$ given by the curve's arc length; $$   t_{ba} = \int_{\lambda_a}^{\lambda_b}d\lambda \sqrt{-g_{\mu\nu}(x(\lambda))\dot x^\mu(\lambda)\dot x^\nu(\lambda)} $$ will have elapsed where $g_{\mu\nu}$ is a metric on spacetime with signature $(-,+,+,+)$.    Why is this so?     Here is how I would attempt to justify this fact in special relativity with $g_{\mu\nu} = \eta_{\mu\nu}$.  Consider an inertial observer $O$ in $\mathbb R^{3,1}$, and suppose that this observer sees a clock, which I'll call observer $O'$ moving around on a curve $x^\mu(\lambda)$.  If $O'$ were also an inertial observer, then given any event with coordinates $x^\mu$ as measured by $O$, observer $O'$ would measure the coordinates of the event to be $x'^\mu = \Lambda^\mu_{\phantom\mu\nu} x^\nu + x_0^\mu$ for some Lorentz transformation $\Lambda$.  If $O'$ is not inertial, then this is no longer true, and there is some more complicated family of transformations, say $T_\lambda$ between events as seen by both observers.  I would argue, however, that if we were to partition the interval $[\lambda_a, \lambda_b]$ into a large number $N$ of intervals $I_1=[\lambda_a, \lambda_i], \dots, I_N=[\lambda_{N-1}, \lambda_b]$ with $\lambda_n = \lambda_a+n\epsilon_N$ and $\epsilon_N=(\lambda_b-\lambda_a)/N$, then on each interval $I_n$, $O'$ is approximately an inertial observer in the sense that $$   T_{\lambda_n} = P_n + \mathcal O(\epsilon_N), \qquad (\star) $$ for some Poincare transformation $P_n$.  Then we would note that since $O'$ is stationary in his own reference frame, he measures his worldline to have the property $\dot x'^\mu(\lambda) = (\dot t(\lambda), \mathbf 0)$ so that $$   I_{ba}=\int_{\lambda_a}^{\lambda_b}d\lambda \,\sqrt{-\eta_{\mu\nu}\dot x'^\mu\dot x'^\mu} = \int_{\lambda_a}^{\lambda_b} d\lambda \, \sqrt{\dot t^2} = t(\lambda_b) - t(\lambda_a) = t_{ba} $$ On the other hand the integral on the left can be written as a Riemann sum using the partition above, and we can invoke ($\star$) above to get \begin{align}   I_{ba}  &amp;= \lim_{N\to\infty}\left[\sum_{n=1}^N \epsilon_N\sqrt{-\eta_{\mu\nu}\dot x'^\mu(\lambda_n)\dot x'^\nu(\lambda_n)}\right] \notag\\ &amp;= \lim_{N\to\infty}\left[\sum_{n=1}^N \epsilon_N\sqrt{-\eta_{\mu\nu}\dot x^\mu(\lambda_n)\dot x^\nu(\lambda_n)} + \mathcal{O}(\epsilon_N^2)\right] \notag\\ &amp;= \int_{\lambda_a}^{\lambda_b}d\lambda \,\sqrt{-\eta_{\mu\nu}\dot x^\mu\dot x^\mu} \end{align} Combining these two computations gives the desired result.  How do others feel about this argument?  I'm not completely comfortable with it because of the assumption $(\star)$ I made on $T_\lambda$.  I imagine that in GR a similar argument could be made by invoking local flatness of the metric. "A/An" preceding a parenthetical statement Passcode is required to enable Touch ID This morning I experienced the weirdest thing by my iPhone 6S requiring me to enter my passcode rather than allowing me to use my finger as Touch ID.  My phone was locked probably for like 4 hours while charging overnight and as far as my knowledge my phone did not restart during this time since my Stack Exchange app was left open and upon opening it the same content were still there.  I didn't attempt even once to use my Touch ID; if I would've had a faulty Touch ID sensor then I should've seen such similar behavior either prior to this morning or at least afterwards (I'm already on my phone for the past 3 hours plus).  I didn't register or delete any fingerprints for months.  And finally, I don't have any restrictions setup to require the input of my passcode under Settings > General > Restrictions.  I'm running on iOS Version 10.0 beta 3 (14A5309d)  Anyone out there that has also experienced such similar behavior or with any suggestion on what might've caused it? How to remove duplicate entries in dash? Keyboard shortcut to switch between applications in Mission Control Does Apple have keyboard shortcuts to switch between applications in Mission Control? (Instead of hovering over with the cursor)?  e.g., which key combination cal I press to get me from "preview" to "app store?" Travelling without a visa after passport was stolen In Drupal 7, I used the Secure login module to run the site on a secure connection, but it seems it doesn't revert back to http on logout. I would like to just run the whole site as https:// as a simplification.  Is there a simple way to do this without the use of module? I have Blender 2.79 on my Windows 7 system.    I want to install 2.8, but I'm completing some courses which use 2.79.  If I install 2.8, will it automatically replace 2.79?  Will they interfere with one another?  Thanks. Show that there are $ a,b \geq 0 $ so that $ |f(x)| \leq ax+b, \forall x \geq 0.$ Ubuntu 14.04, Intel Chromebook, no sound On Irix's  4Dwm, there was an ability to minimise windows into a box (contrary to the task bar used by modern window managers). I have seen this also on an old HPUX.  See the "console" square in the linked image:    Is it possible to accomplish on Ubuntu, either with a plugin or maybe some  window manager other than Unity? How to quickly and easily create a grid with Adobe Photoshop? Suppose I need to draw a grid in Photoshop, each square being the same size, and a certain amount of pixels tall and wide, and the grid lines having a certain pixel width. Like this:     Currently I do this by drawing one square, copy+pasting+moving+merging it a few times to create one row, copy/pasting that a few times to create more rows above each other.  It works, but feels very clumsy, I'm sure there ought to be a more efficient way to do this?  What are some efficient methods for creating a grid of equally sized squares? Built-in unit strings recognized by Quantity? How to use PSTricks in pdfLaTeX? How can I create a brace spanning multiple lines on the right side of an itemized list? I have an itemized list:  \begin{itemize}     \item Lorem     \item Ipsum     \item Sit     \item Dolor     \item Amet \end{itemize}   I want to create an accolade on the right side of 'Lorem' and 'Ipsum', and add a bit of text at the point of the accolade. The level of this text should be between the first and the second line. How can I get this done? How do I build a loop in JavaScript? How can I build a loop in JavaScript? How much of 32-bit support is dropped in macOS Catalina? macOS Catalina is said to have dropped support for 32-bit apps. It’s not clear how much support is dropped.   Is there any supported way for a 64-bit app to request the kernel to create a 32-bit code segment? How can I view the camera through an object as a material in Cycles?