Hi I am (very) new to java and I come from a c++ background and I am getting this error: Array-Lists-In-java.java:3: error: '{' expected public class Array-Lists-In-java{                   ^  and here is my code:     import java.util.ArrayList;          public class Array-Lists-In-java {              public static void main(String[] args)         {             ArrayList&lt;String&gt; grocery = {&quot;Onions&quot;,&quot;Carrots&quot;,&quot;Olives&quot;, &quot;olive oil&quot;};                          printArray(grocery);                          grocery.add(&quot;Tomatoes&quot;);                          printArray(grocery);                      }                  public static void printArray(ArrayList&lt;String&gt; list)         {             for(int i = 0; i &lt; list.size(); i++)             {                 System.out.println(list.get(i));             }         }              }  what am I doing wrong??pls correct me where i am going wrong it would be really helpful thanks
What characters are valid in a Java class name? What other rules govern Java class names (for instance, Java class names cannot begin with a number)?
Elsarticle - Abstract two columns wide I am currently trying to create an article in elsarticle style, twocolumn. The title and text end up in two columns, the abstract however is made two columns wide. Any ideas what I am doing wrong? Obviously I want my abstract to also be only in the first column.  \documentclass[a4paper,10pt,twocolumn,preprint]{elsarticle}  \usepackage{lipsum}  \journal{TexExchange}   \begin{document}     \begin{frontmatter}       \title{Two-column abstract}       \begin{abstract}         \lipsum[1]      \end{abstract}       \begin{keyword}        abstract      \end{keyword}    \end{frontmatter}   \section{Outline}    \lipsum[2-3]  \end{document} Proof of orthogonal matrix In the following question we regard vectors in $\Bbb R^n$ as columns and define the dot product in the usual way which means that $x · y$ = $x^{t}y$  a) If A is an n × n matrix show that $A_{ij}$ = $e_i \cdot A e_j$ where $e_i$, $i =1, \dots , n$ are the standard basis vectors in $\Bbb R^n$  b) Show that a matrix $P$ is orthogonal if and only if ($Px$) · ($Py$) =$x · y$ for all $x, y$ ∈ $\Bbb R^n$  Working -   I got part (a) alright but have no idea of where to start with part (b) except to use the information that an n x n matrix $P$ is orthogonal if $P^{-1}$= $P^{t}$ and that $P^{t}$$P$=$I$, $P$$P^{t}$=$I$, where $I$ is the identity matrix. Any suggests are gracefully appreciated. Feel free to edit my question for clarity. Thank you Help to do something or help do something? I wrote:      I will help you to acquire Russian.    A native English speaker corrected me saying that 'to' is unnecessary here. Is it correct to say      "I will help you acquire Russian" Variance of the future value of a cash flow I want to compute the variance of $FV =A\sum_{k=1}^n(1+r)^k=:g(r)$, assuming interest rate $r\sim\mathrm{N}(\mu,\sigma^2)$ and constant equal payments $A$. As discussed in the comments, the Delta Method gives an approximation $\mathrm{Var}[FV]≈\sigma^2\times(g′(\mu))^2$. Is there a way to get an exact answer? using trial and error in math problems Suppose one bacterium is in a jar at 12AM, and then suppose there are two bacteria at 12:30AM,  and then there are four bacteria at 1AM, etc.  (a)  How many bacteria will be in the jar at 12PM that day?  (b)  Use trial and error to estimate at what time there will be 1 billion (1,000,000,000) bacteria in the jar.  for a) is it going to be 44 bacterias ? or am i wrong? Please help with b), i have no idea how to figure it out in short term Thanks Inverse Fourier transform of Gaussian I need to calculate the Inverse Fourier Transform of this Gaussian function:  $\frac{1}{\sqrt{2\pi}} exp(\frac{-k^2 \sigma^2}{2})$  where $\sigma &gt; 0$, namely I have to calculate the following integral: $\int{\frac{1}{\sqrt{2\pi}} \exp(\frac{-k^2 \sigma^2}{2})} \exp(ikx) dk$.  How can I do that? If I am not wrong (in which case please correct me) the result should be $\frac{1}{\sqrt{2\pi}\sigma}exp(\frac{-x^2}{2\sigma^2})$...but I don't know how to get there! I have to figure out a way to count how many sequences are there s.t:   My alphabet is $1$ up to $49$. Each number that is chosen, is chosen only once. The sequence is $6$ digits long. The sequence is in increasing order.  e.g that is a valid sequence: $(1, 2, 40, 42, 43, 49)$  and this is not: $(1, 2, 40, 25, 25, 12)$   I know that for the first 3 rules the answer is: $\binom{49}{6}\cdot 6!$  How do I deal with the fourth? This morning I started my Google Chrome browser as I do every day. The text size was suddenly bigger than normal, on all sites. I did not change any setting anywhere.  If I set the zoom to 90% it looks fine, but this breaks various things (e.g. Stack Exchange chat) so prefer to avoid it if possible.  Setting font size to Small in Chrome Settings also help, but it's too small.  I have uninstalled Chrome (deleting local data) and installed again, same thing. Tried beta channel as well, no change.  Windows 7 OS 64 bit, Display set to 125% from the very beginning. (Did not change this for years)  What could have caused this and how can it be solved?  This very question turns out to be a good example to demonstrate what I mean:        While the body itself is small (as I changed the font size in Settings), other things are still huge and not affected by the setting. Hello,    This question is about the Command Line Developer Tools that are usually installed with xcode-select --install and updated via a software update from the Mac App Store (at least until macOS 10.13). I use the developer toolchain on a daily basis and it has always worked and updated without issues.    Today I've updated my mac from High Sierra 10.13.6 to Mojave 10.14.1, and I've lost the ability to update the Developer Tools.    After the update I've executed a terminal command that relies on the developer tools being installed. It was a command to update , although I don't think that the specifics matter, as I believe that any task that tried to access the developer tools would have triggered the same error message.    The error was:   xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun       The phrasing was new (maybe), but I thought that it was caused by the usual need to re-install the Developer Tools after some macOS updates.    Later I tried to dig a bit deeper into the failure, and found out that:  $ ls -l /Library/Developer/CommandLineTools/usr/total 0drwxr-xr-x  3 root  admin  96  4 Nov 19:32 share$ which xcrun/usr/bin/xcrun$ xcode-select -p/Library/Developer/CommandLineTools    Still, as I normally do, I entered the command to install and update the Developer Tools in the terminal:  xcode-select --install    This started the usual procedure: modal window to confirm, then request to accept the license agreement, followed by a progress bar. Except that it failed very quickly with an unexpected error:     Can&rsquo;t install the software because it is not currently available from the Software Update server.     I've tried several times, to no avail. It gets always stuck.    Sometimes, however, the failure causes the System Preferences to report a pending update:      If I open that preference panel it starts searching for updates, and it always finds nothing except the first time that it happened. The first time, it found this:          It literally suggested me to install the updates for macOS 10.11 and 10.13. I have no idea why.  I closed the preference without installing, and as I said it hasn't shown them again. There is also no update available in new Mac App Store.   Is this a known issue? Is there any way to resolve the problem?     Update  Of course I can download the Dev Tools for macOS 10.14 installer from .  Before installing them manually, though, I'm wondering if there is anything that's broken with the system. How to update textbox in form1 from form2? Short story that takes place off planet, involving sun and rain I read this short story about 20 years ago, and I'd love to find the title and author. This is what I can recall about the story:   It takes place in a classroom full of kids (around 10 years old?) The planet always gets rain The kids lock the main character (a girl, I think) in the closet during the very rare occurrence of sunlight and she misses the entire event.    I know it's not much to go on, but I hope it rings a bell for someone! Why is it difficult to differentiate between  and ? Is it because we don't clearly understand how both of these phenomenon takes place?   My thoughts: From an answer to one of my earlier question  I could understand that light waves behave differently when it strikes a slit which is of several times bigger than its wavelength and when it strikes a slit of size comparable to it its wavelength.In the former case the different points on the slit acts as wave-front sources producing circular wave fronts which interfere to form the diffraction pattern but in the later case plane wave-front striking a slit after passing through it forms circular wave-fronts and two such wave-fronts from two different slits interfere to form the interference pattern. But, I'm not satisfied by that because I don't get any intuition about points on the slit acting as wavefront sources. So, what is actually happening? Prove that the product of two continuous functions is continuous The relationship of ${\frak m+m=m}$ to AC Infinite group with only two conjugacy classes I'm looking for a Drupal Commerce Shipping in-cart estimate I have recently upgraded a Windows 7 Home Premium PC with 12 GB of RAM. For some reason once I looked in the System tab it said only 7.96 GB of 12 GB of RAM is usable. I have already tried to go into the msconfig to see if the Maximum Memory was ticked, which it wasn't.  Is there a solution to this error? The other topics that I have viewed on Super User did not help me at all.  Installed RAM:   msconfig:   My Windows Edition is showing "Home Premium":   Resource Monitor: I have this function $$f(x) = x\cos(1/x)$$ defined for all $x \geq 1$.      How do I prove that    $$f(x+2)-f(x)&gt;2$$    for all $x\geq 1$?   I found $$f'(x)= \cos(1/x) + \frac{\sin(1/x)}{x}$$ and $$f''(x)=-\frac{\cos(1/x)}{x^3}.$$ How do i use this information? The first homology group $ H_1(E(K); Z) $ of a knot exterior is an infinite cyclic group which is generated by the class of the meridian. Where are Time Machine local backups/snapshots stored? Out of curiosity, I'm wondering where in the file system Time Machine stores its local backups/snapshots.