java中报错找不到符号 符号类Calculate

自己动手写了一个小程序,在eclipse中没有报错,但是在控制台报错了,有图片图片说明
代码如下:public class Calculate {

 private int num1;
 private int num2;
 private char option;
 public void initcalculate(int a1,int a2, char o){
     num1=a1;
     num2=a2;
     if(o=='+'||o=='-'||o=='*'||o=='/'){
         option=o;
     }else{
         option='+';

     }

 }
 public void  calculate(){
     switch(option){
     case '+': System.out.println("加法运算"+(num1+num2));
               break;
     case'-':  System.out.println("减法运算"+(num1-num2)); 
               break;
     case'*':  System.out.println("乘法运算"+(num1*num2)); 
               break; 
     case'/':  System.out.println("除法运算"+(num1/num2)); 
               break;

     } 
 }

}
package test;

public class Testcalculate {
public static void mian(String[] args){
Calculate c=new Calculate();
c.initcalculate(8,2,'*');
c.calculate();
}
}

4个回答

public class Calculate,去掉public
public的class名字必须和java原文件名一样。

这两个类是在同一个文件中吗

同意一楼的看法

public static void mian(String[] args){

里面的main都写错了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
JAVA数组传参以及返回,打印时出现找不到符号求问哪里出错了?

package calculate; public class Calculate { public static void main(String[] args) { // TODO code application logic here Calculate caculate = new Calculate(); int count=0; for(int i=0;i<50;i++){ int x=(int)(Math.random()*2);//设置随机0,1变量 int first=(int)(Math.random()*100);//设置随机0-100变量 int second=(int)(Math.random()*100); int[] result = new int[50]; if(x==0) caculate.addition(i,first,second,result);//调用加法 else caculate.subtraction(i,first,second,result);//调用减法 count++; if(count%5==0) System.out.println("\n");//每五题换行 } for(int i=0;i<50;i++) //-------------------------------------------------------------- //此处的result被提示找不到符号------------------------------------------------- // System.out.print((i+1)+": " + result[i]); } //加法 public void addition(int j,int a,int b,int[] result){ System.out.print((j+1)+": "+a+" + "+b+" = "); result[j] = a + b; } //减法 public void subtraction(int k,int m,int n,int[] result){ System.out.print((k+1)+": "+m+" - "+n+" = "); result[k] = m - n; } }

PHP结帐页面无法使用“找不到对象”错误

<div class="post-text" itemprop="text"> <p>I was just wondering if I could get some help with this big website project I have for my introductory web programming class. The website is supposed to be a little online store with a home page, a shop page, and a checkout page.</p> <p>I cannot seem to get the checkout page to work, as when I grade the assignment it gives me 7 "object not found" errors.</p> <p>My professor told me that I have 1 extra character in my SQL that causes a critical error but I cannot find it for the life of me. </p> <p>Here's my code:</p> <pre><code>&lt;?php session_start(); //include php library include("website 01 library.php"); echo "&lt;h1 id = 'header' class = ''&gt;CHECKOUT&lt;/h1&gt;"; $category = $_SESSION[category]; $host_name = "localhost"; $user_name = "web"; $password = "programming"; $database = "assignments"; $connection = mysqli_connect($host_name, $user_name, $password, $database); $sql = "select * from cart, product, where cart.productid = product.productid"; $recordSet = mysqli_query($connection, $sql); $total = 0; // Process the recordset in a loop while ($record = mysqli_fetch_array($recordSet, MYSQLI_ASSOC)) { $productid = $record[productid]; $title = $record[title]; $quantity = $record[quantity]; $price = $record[price]; $totalCost = $price * $quantity; $total = $total + $totalCost; // product name echo "&lt;td id = 'title_$productid' class = ''&gt;$title&lt;/td&gt;"; // quantity purchased echo "&lt;td id = 'quantity_$productid' class = ''&gt;$quantity&lt;/td&gt;"; //price echo "&lt;td id = 'price_$productid' class = ''&gt;$price&lt;/td&gt;"; $totalCost_productid = $totalCost_productid + $price; //echo "&lt;td id = 'totalCost_$productid = quantity_$productid * price_$productid&gt;&lt;/td&gt;"; // total cost for product (calculate as quantity * price) //echo "&lt;td id = 'totalCost_$productid' class = ''&gt;&lt;/td&gt;"; mysqli_close($connection); mysqli_free_result($recordSet); }; echo "&lt;td id = 'total' class = ''&gt;$total&lt;/td&gt;"; echo $totalCost_productid; mysqli_close($connection); mysqli_free_result($recordSet); echo "&lt;table class = '' border = 1&gt;"; echo "PRODUCT&lt;tr&gt;"; echo "&lt;td class = ''&gt;&lt;/td&gt;"; echo "&lt;td class = ''&gt;&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "QUANTITY&lt;tr&gt;"; echo "&lt;td class = ''&gt;&lt;/td&gt;"; echo "&lt;td class = ''&gt;&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "&lt;table class = '' border = 1&gt;"; echo "PRICE&lt;tr&gt;"; echo "&lt;td class = ''&gt;&lt;/td&gt;"; echo "&lt;td class = ''&gt;&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "TOTAL COST&lt;tr&gt;"; echo "&lt;td class = ''&gt;&lt;/td&gt;"; echo "&lt;td class = ''&gt;&lt;/td&gt;"; echo "&lt;/tr&gt;"; echo "&lt;/table&gt;"; ?&gt; </code></pre> <p>Any help would be greatly appreciated.</p> </div>

anconda更新后出现OSError[Winerror 126]找不到指定模块该如何解决?

如题,以下为报错 Traceback (most recent call last): File "F:\a\lib\site-packages\conda\exceptions.py", line 1043, in __call__ return func(*args, **kwargs) File "F:\a\lib\site-packages\conda\cli\main.py", line 84, in _main exit_code = do_call(args, p) File "F:\a\lib\site-packages\conda\cli\conda_argparse.py", line 80, in do_call module = import_module(relative_mod, __name__.rsplit('.', 1)[0]) File "F:\a\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "F:\a\lib\site-packages\conda\cli\main_install.py", line 8, in <module> from .install import install File "F:\a\lib\site-packages\conda\cli\install.py", line 19, in <module> from ..core.index import calculate_channel_urls, get_index File "F:\a\lib\site-packages\conda\core\index.py", line 9, in <module> from .package_cache_data import PackageCacheData File "F:\a\lib\site-packages\conda\core\package_cache_data.py", line 15, in <module> from conda_package_handling.api import InvalidArchiveError File "F:\a\lib\site-packages\conda_package_handling\api.py", line 3, in <module> from libarchive.exception import ArchiveError as _LibarchiveArchiveError File "F:\a\lib\site-packages\libarchive\__init__.py", line 1, in <module> from .entry import ArchiveEntry File "F:\a\lib\site-packages\libarchive\entry.py", line 6, in <module> from . import ffi File "F:\a\lib\site-packages\libarchive\ffi.py", line 27, in <module> libarchive = ctypes.cdll.LoadLibrary(libarchive_path) File "F:\a\lib\ctypes\__init__.py", line 434, in LoadLibrary return self._dlltype(name) File "F:\a\lib\ctypes\__init__.py", line 356, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] 找不到指定的模块。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "F:\a\Scripts\conda-script.py", line 12, in <module> sys.exit(main()) File "F:\a\lib\site-packages\conda\cli\main.py", line 150, in main return conda_exception_handler(_main, *args, **kwargs) File "F:\a\lib\site-packages\conda\exceptions.py", line 1335, in conda_exception_handler return_value = exception_handler(func, *args, **kwargs) File "F:\a\lib\site-packages\conda\exceptions.py", line 1046, in __call__ return self.handle_exception(exc_val, exc_tb) File "F:\a\lib\site-packages\conda\exceptions.py", line 1090, in handle_exception return self.handle_unexpected_exception(exc_val, exc_tb) File "F:\a\lib\site-packages\conda\exceptions.py", line 1101, in handle_unexpected_exception self.print_unexpected_error_report(error_report) File "F:\a\lib\site-packages\conda\exceptions.py", line 1171, in print_unexpected_error_report from .cli.main_info import get_env_vars_str, get_main_info_str File "F:\a\lib\site-packages\conda\cli\main_info.py", line 19, in <module> from ..core.index import _supplement_index_with_system File "F:\a\lib\site-packages\conda\core\index.py", line 9, in <module> from .package_cache_data import PackageCacheData File "F:\a\lib\site-packages\conda\core\package_cache_data.py", line 15, in <module> from conda_package_handling.api import InvalidArchiveError File "F:\a\lib\site-packages\conda_package_handling\api.py", line 7, in <module> from .tarball import CondaTarBZ2 as _CondaTarBZ2 File "F:\a\lib\site-packages\conda_package_handling\tarball.py", line 7, in <module> import libarchive File "F:\a\lib\site-packages\libarchive\__init__.py", line 1, in <module> from .entry import ArchiveEntry File "F:\a\lib\site-packages\libarchive\entry.py", line 6, in <module> from . import ffi File "F:\a\lib\site-packages\libarchive\ffi.py", line 27, in <module> libarchive = ctypes.cdll.LoadLibrary(libarchive_path) File "F:\a\lib\ctypes\__init__.py", line 434, in LoadLibrary return self._dlltype(name) File "F:\a\lib\ctypes\__init__.py", line 356, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] 找不到指定的模块。

Java·double 型数列求和精度问题

Java入门 不懂就问 计算1+1/2+1/3+1/4+......+1/n这样一个数列 假如n=50000 为什么从右向左算要比从左向右算要精确? 运行代码如下 ``` public class calculate1 { public static void main(String[] args) { // TODO Auto-generated method stub double sum1=0.0; double sum2=0.0; for(double i=1;i<=50000;i+=1) { sum1+=(double)(1/i); } for(double j=50000;j>=1;j-=1) { sum2+=(double)(1/j); } System.out.println("Calculate from left to right:"+sum1); System.out.println("Calculate from right to left:"+sum2); } } ``` 运行结果: Calculate from left to right:11.397003949278504 Calculate from right to left:11.397003949278519

java编程计算面积题目。

编写一个java类,包含3种形状的面积计算方法,包括:矩形、圆形和梯形。 要求: 1.两个java类,一个面积计算类AreaCalculator,一个包含main函数的调用类AreaTest,打印面积计算结果; 2.AreaCalculator类包含3个重载函数Area,计算3种形状面积;

maven Could not calculate build plan?

求助,初学maven,这个错误怎么解决?按照网上的方法未解决,参考的这个:https://www.cnblogs.com/isonre/p/6530500.html ``` Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 ```

Calculate S(n) 怎么来做呢

Problem Description Calculate S(n). S(n)=13+23 +33 +......+n3 . Input Each line will contain one integer N(1 < n < 1000000000). Process to end of file. Output For each case, output the last four dights of S(N) in one line. Sample Input 1 2 Sample Output 0001 0009

Calculate the expression 表达式问题

Problem Description You may find it’s easy to calculate the expression such as: a = 3 b = 4 c = 5 a + b + c = ? Isn’t it? Input The first line contains an integer stands for the number of test cases. Each test case start with an integer n stands for n expressions will follow for this case. Then n – 1 expressions in the format: [variable name][space][=][space][integer] will follow. You may suppose the variable name will only contain lowercase letters and the length will not exceed 20, and the integer will between -65536 and 65536. The last line will contain the expression you need to work out. In the format: [variable name| integer][space][+|-][space][variable name| integer] …= ? You may suppose the variable name must have been defined in the n – 1 expression and the integer is also between -65536 and 65536. You can get more information from the sample. Output For each case, output the result of the last expression. Sample Input 3 4 aa = 1 bb = -1 aa = 2 aa + bb + 11 = ? 1 1 + 1 = ? 1 1 + -1 = ? Sample Output 12 2 0

Calculate the Integral

Define the following functions: Given integer N (1 <= n <= 100) and {an} {bn}, for 1 <= i <= N, define: and calculate the integral: Input A line containing only the integer N is given first. Then N lines follow, each line has two float-point number Ai and Bi. There are several test cases, so process to the end of file. Output For each testcase, output a line containing only the integer N first. Then output a second line containing the result of the integral. The result should be printed in scientific format which has a precision of 10 digits after radix point. Sample Input 1 0 2 2 1 3 0 4 3 2 4 1 5 0 6 Sample Output 1 0.0000000000e+000 2 8.0000000000e+000 3 7.2000000000e+001

JAVA多功能计算器,不能实现"√","1/x","log","sin"功能,下面附代码!请注释!

package exp099s; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class J11W099 extends JFrame { /** * */ private static final long serialVersionUID = 1L; private String front = "", behind = ""; //分别用于记录加减乘除运算符之前,之后输入的内容 private String op; //用于记录运算符 private String re;//用于存储运算结果的字符串格式 private boolean flag = false; //用于记录是否按下了运算符 private boolean flag1 = false;//用于判断是否输入了点运算符 private double result;//用于存储运算结果 private boolean flag2 = false;//用于判断是否输入了数字 private boolean flag3 = false;//用于判断是否按下了等号运算符 JPanel contentPane; JTextField txtResult = new JTextField("0"); JButton btnSqrt = new JButton("√"); JButton btnFour = new JButton("4"); JButton btnFive = new JButton("5"); JButton btnSix = new JButton("6"); JButton btnDecrease = new JButton("-"); JButton btnBegin = new JButton("C"); JButton btnOne = new JButton("1"); JButton btnTwo = new JButton("2"); JButton btnThree = new JButton("3"); JButton btnMultiply = new JButton("*"); JButton btnCancel = new JButton("←"); JButton btnZero = new JButton("0"); JButton btnMinus = new JButton("+/-"); JButton btnPoint = new JButton("."); JButton btnDivide = new JButton("/"); JButton btnEqual = new JButton("="); JButton btnIncrease = new JButton("+"); JButton btnSeven = new JButton("7"); JButton btnEight = new JButton("8"); JButton btnNine = new JButton("9"); JButton btnDown = new JButton("1/x"); JButton btnSin = new JButton("sin"); JButton btnLog = new JButton("log"); public J11W099() { try { setDefaultCloseOperation(EXIT_ON_CLOSE); jbInit(); } catch (Exception exception) { exception.printStackTrace(); } } private void jbInit() throws Exception { contentPane = (JPanel) getContentPane(); contentPane.setLayout(null); this.setResizable(false); setSize(new Dimension(400, 300)); setTitle("计算器"); txtResult.setEnabled(false); txtResult.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); txtResult.setEditable(false); txtResult.setHorizontalAlignment(SwingConstants.RIGHT); txtResult.setBounds(new Rectangle(33, 19, 378, 34)); //btnNull.addActionListener(new FrameCalculate_btnNull_actionAdapter(this)); //第一行 btnSeven.setBounds(new Rectangle(33, 70, 46, 37)); btnSeven.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnEight.setBounds(new Rectangle(101, 70, 46, 37)); btnEight.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnNine.setBounds(new Rectangle(167, 70, 46, 37)); btnNine.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnIncrease.setBounds(new Rectangle(234, 70, 46, 37)); btnIncrease.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnSqrt.setBounds(new Rectangle(298, 70, 46, 37)); btnSqrt.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12)); btnBegin.setBounds(new Rectangle(366, 70, 46, 37)); btnBegin.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15)); //第二行 btnFour.setBounds(new Rectangle(33, 120, 46, 37)); btnFour.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnFive.setBounds(new Rectangle(101, 120, 46, 37)); btnFive.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnSix.setBounds(new Rectangle(167, 119, 46, 37)); btnSix.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnDecrease.setBounds(new Rectangle(234, 120, 46, 37)); btnDecrease.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnDown.setBounds(new Rectangle(298, 121, 46, 37)); btnDown.setFont(new java.awt.Font("Dialog", Font.PLAIN, 8)); btnCancel.setBounds(new Rectangle(366, 121, 46, 37)); btnCancel.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12)); //第三行 btnOne.setBounds(new Rectangle(33, 172, 46, 37)); btnOne.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnTwo.setBounds(new Rectangle(101, 172, 46, 37)); btnTwo.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnThree.setBounds(new Rectangle(167, 172, 46, 37)); btnThree.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnMultiply.setBounds(new Rectangle(234, 172, 46, 37)); btnMultiply.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnSin.setBounds(new Rectangle(298, 172, 46, 37)); btnSin.setFont(new java.awt.Font("Dialog", Font.PLAIN, 9)); btnLog.setBounds(new Rectangle(366, 172, 46, 37)); btnLog.setFont(new java.awt.Font("Dialog", Font.PLAIN, 9)); //第四行 btnZero.setBounds(new Rectangle(33, 222, 46, 37)); btnZero.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnMinus.setBounds(new Rectangle(101, 222, 46, 37)); btnMinus.setFont(new java.awt.Font("Dialog", Font.PLAIN, 10)); btnPoint.setBounds(new Rectangle(167, 222, 46, 37)); btnPoint.setFont(new java.awt.Font("Dialog", Font.PLAIN, 30)); btnPoint.setHorizontalTextPosition(SwingConstants.CENTER); btnDivide.setBounds(new Rectangle(234, 222, 46, 37)); btnDivide.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnEqual.setBounds(new Rectangle(298, 222, 114, 37)); btnEqual.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); //加载C和←的监听事件 btnBegin.addActionListener(new Calculate_btnBegin_actionAdapter(this)); btnCancel.addActionListener(new Calculate_btnCancel_actionAdapter(this)); //加载√ 1/x log sin 的监听事件 btnSqrt.addActionListener(new Calculate_btnSqrt_actionAdapter(this)); btnDown.addActionListener(new Calculate_btnDown_actionAdapter(this)); btnLog.addActionListener(new Calculate_btnLog_actionAdapter(this)); btnSin.addActionListener(new Calculate_btnSin_actionAdapter(this)); //加载数字0-9的监听事件 btnZero.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnOne.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnTwo.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnThree.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnFour.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnFive.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnSix.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnSeven.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnEight.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnNine.addActionListener(new Calculate_btnZero_actionAdapter(this)); //加载+/- . = 的监听事件 btnMinus.addActionListener(new Calculate_btnMinus_actionAdapter(this)); btnPoint.addActionListener(new Calculate_btnPoint_actionAdapter(this)); btnEqual.addActionListener(new Calculate_btnEqual_actionAdapter(this)); //加载加减乘除运算符的监听事件 btnIncrease.addActionListener(new Calculate_btnIncrease_actionAdapter(this)); btnDecrease.addActionListener(new Calculate_btnIncrease_actionAdapter(this)); btnMultiply.addActionListener(new Calculate_btnIncrease_actionAdapter(this)); btnDivide.addActionListener(new Calculate_btnIncrease_actionAdapter(this)); contentPane.add(btnFive); contentPane.add(btnSix); contentPane.add(btnDecrease); contentPane.add(btnBegin); contentPane.add(btnOne); contentPane.add(btnTwo); contentPane.add(btnThree); contentPane.add(btnMultiply); contentPane.add(btnCancel); contentPane.add(btnMinus); contentPane.add(btnPoint); contentPane.add(btnDivide); contentPane.add(btnEqual); contentPane.add(btnEight); contentPane.add(btnNine); contentPane.add(btnFour); contentPane.add(btnSeven); contentPane.add(btnIncrease); contentPane.add(btnSqrt); contentPane.add(txtResult); contentPane.add(btnZero); contentPane.add(btnDown); contentPane.add(btnSin); contentPane.add(btnLog); } public void btnZero_actionPerformed(ActionEvent e) { if (flag) { //如果刚刚按下了运算符 txtResult.setText(""); if (flag1) {//判断之前是否输入了点运算符 txtResult.setText("0." + e.getActionCommand()); flag1 = false; } else { txtResult.setText(e.getActionCommand()); } flag2 = true; } else { int num = txtResult.getText().indexOf("."); if (num < 0 && !txtResult.getText().equals("0")) { txtResult.setText(txtResult.getText() + e.getActionCommand()); } else if (num < 0 && txtResult.getText().equals("0")) { txtResult.setText(e.getActionCommand()); } else if (num >= 0 && txtResult.getText().equals("0")) { txtResult.setText("0." + e.getActionCommand()); } else if (num >= 0 && !txtResult.getText().equals("0")) { txtResult.setText(txtResult.getText() + e.getActionCommand()); } } flag = false; flag3=false; } public void btnIncrease_actionPerformed(ActionEvent e) { if(flag3){ txtResult.setText(txtResult.getText()); op = e.getActionCommand(); //得到刚刚按下的运算符 front = txtResult.getText(); //记录加减乘除运算符之前输入的内容 } else if (flag2) { ActionEvent ee = new ActionEvent("qq", 1, "pp"); btnEqual_actionPerformed(ee); op = e.getActionCommand(); //得到刚刚按下的运算符 front = re; flag2 = false; } else { front = txtResult.getText(); //记录加减乘除运算符之前输入的内容 op = e.getActionCommand(); //得到刚刚按下的运算符 } flag3=false; flag = true; //记录已经按下了加减乘除运算符的其中一个 } public void btnEqual_actionPerformed(ActionEvent e) { if(!flag3)//未曾按下等于运算符 behind = txtResult.getText(); else front = re; try { double a1 = Double.parseDouble(front); double b1 = Double.parseDouble(behind); if (op == "+") { result = a1 + b1; } else if (op == "-") { result = a1 - b1; } else if (op == "*") { result = a1 * b1; } else { result = a1 / b1; } re = Double.toString(result); txtResult.setText(re); } catch (ArithmeticException ce) { txtResult.setText("除数不能为零"); } catch (Exception ee) { } if (!flag3) flag3 = true; } public void btnPoint_actionPerformed(ActionEvent e) { int num=txtResult.getText().indexOf("."); if(num<0 && !flag) txtResult.setText(txtResult.getText()+e.getActionCommand()); if(flag) flag1=true; } public void btnBegin_actionPerformed(ActionEvent e) {//清零运算符事件处理 flag=false; flag1=false; flag2=false; flag3=false; front=""; behind=""; re=""; txtResult.setText("0"); } public void btnMinus_actionPerformed(ActionEvent e) {//取反运算符事件处理 if(txtResult.getText().equals("0")){//如果文本框内容为0 txtResult.setText(txtResult.getText()); }else if(txtResult.getText().indexOf("-")>=0){//若文本框中含有负号 String a=txtResult.getText().replaceAll("-",""); txtResult.setText(a); }else if(flag){ txtResult.setText("0"); }else{ txtResult.setText("-"+txtResult.getText()); } } public void btnCancel_actionPerformed(ActionEvent e) {//退格事件处理方法 String str=txtResult.getText(); if(str.length() == 1){//如文本框中只剩下最后一个字符,将文本框内容置为0 txtResult.setText("0"); } if(str.length()>1){ str=str.substring(0,str.length()-1); txtResult.setText(str); } } public static void main(String[] args){ J11W099 fc = new J11W099(); fc.setSize(468,310); fc.setLocation(200,150); fc.setVisible(true); } } //监听事件的类 class Calculate_btnCancel_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnCancel_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnCancel_actionPerformed(e); } } class Calculate_btnMinus_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnMinus_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnMinus_actionPerformed(e); } } class Calculate_btnBegin_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnBegin_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnBegin_actionPerformed(e); } } class Calculate_btnPoint_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnPoint_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnPoint_actionPerformed(e); } } class Calculate_btnEqual_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnEqual_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnEqual_actionPerformed(e); } } class Calculate_btnIncrease_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnIncrease_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnIncrease_actionPerformed(e); } } class Calculate_btnZero_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnZero_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnZero_actionPerformed(e); } } class Calculate_btnSqrt_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnSqrt_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnZero_actionPerformed(e); } } class Calculate_btnDown_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnDown_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnZero_actionPerformed(e); } } class Calculate_btnLog_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnLog_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnZero_actionPerformed(e); } } class Calculate_btnSin_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnSin_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnZero_actionPerformed(e); } }

Calculate Roads

Little Vitta needs to go from home to school every day. On her way to school, there are n crossing and m roads in total. Because of lazy, she often gets up late in the morning. In order to get to school on time, she wishes that she can always go to school in the shortest path.(Assume that the time cost on every road is 1. And all roads are bidirectional. That is to say, if she can go from A to B, she always can go from B to A). But on some specific crossings, there are some terrible insects which makes Vitta scared. She expects the crossings which has insects don't exceed k. She wants know the number of all possible paths, can you help her? Input We assume Vitta's home is node 1, and the school is node n. For each case, there are 3 integers in first line, m n k(m <= 1000000, n <= 5000, k <= 50), as the problem statement says. In the following n lines, every line contains 2 integer x and y. y equals 1 means node x has terrible insects else if y equals 0 means there is no insect. In the following m lines, every line contains 2 integer p and q, which means node p and node q is linked. Output For each case, output contains only 1 line. If the path satisfies the requirement exists, you only need to output the numbers of paths. If not, you should output "Impossible!" Sample Input 11 8 1 1 0 2 1 3 0 4 0 5 1 6 1 7 0 8 0 1 2 1 3 1 4 2 5 2 6 3 5 3 7 4 6 5 8 6 8 7 8 Sample Output 3 Hint To Sample 3 possible paths are 1-3-5-8 1-4-6-8 1-3-7-8

一个Java中的赋值问题

用java做算法时中间写了 public double calculate( int[] p, int num) { double [][] a = new double[num][num+1]; a[0][1]=p[0]/100; a[0][0]=1-p[0]/100; ...................... } 这段,但是System.out.println(a[0][1])和System.out.println(a[0][0])时都输出了0.0,值没有赋进去。 但是写成 public double calculate( int[] p, int num) { double [][] a = new double[num][num+1]; a[0][1]=p[0]; a[0][0]=100-p[0]; a[0][1]=a[0][1]/100; a[0][0]=a[0][0]/100; ...................... } 时就成功赋值进去了,请问这是为什么呀?

Calculate the formula

Problem Description You just need to calculate the sum of the formula: 1^2+3^2+5^2+……+ n ^2. Input In each case, there is an odd positive integer n. Output Print the sum. Make sure the sum will not exceed 2^31-1 Sample Input 3 Sample Output 10

java缓存数据同步问题

最近在做一个简单的java缓存,线程的主要功能是:查询缓存中是否存在该值,存在则返回,不存在则计算,计算完了将该键值对放到Cache里面。但是这里有个数据同步的问题,可能会有重复计算。即线程1发现不存在该值,去计算,线程2访问同一数据随后也发现不存在该值,去计算。这样就会出现重复计算,请问有没啥办法避免。谢谢大家了! public void run() { Long result = null; InputMsg msg = new InputMsg(num,id); //先查看该msg的值是否有存在缓存中,有则输出值并返回。 if(cache.containsKey(msg)){ System.out.println("cache:"+" "+cache.get(msg)); return; } //由于没有缓冲值,则绪按输入规则计算。 result = calculate(msg.getId()); //计算成功之后,还要看是否在计算的过程中,其他线程已经把结果计算出来了,是则返回值,不修改内存,反之,则锁定缓存区,写入值, synchronized (cache) { if(cache.containsKey(msg)){ System.out.println("cache:"+" "+cache.get(msg)); return; } //若缓存已满,则按照缓存策略删除一些数据再写入 if(cache.isFull()) cache.deleteMsg(); cache.putMsg(msg, result); System.out.println("Caculate: "+ result); } return; } 最后自己用的FutureTask解决了这个问题。有需要的我再贴代码上来吧~谢谢各位了

数学的数字的符号的计算方法问题,用C程序语言编程

Problem Description onmylove has invented a game on n × m grids. There is one positive integer on each grid. Now you can take the numbers from the grids to make your final score as high as possible. The way to get score is like the following: ● At the beginning, the score is 0; ● If you take a number which equals to x, the score increase x; ● If there appears two neighboring empty grids after you taken the number, then the score should be decreased by 2(x&y). Here x and y are the values used to existed on these two grids. Please pay attention that "neighboring grids" means there exits and only exits one common border between these two grids. Since onmylove thinks this problem is too easy, he adds one more rule: ● Before you start the game, you are given some positions and the numbers on these positions must be taken away. Can you help onmylove to calculate: what's the highest score onmylove can get in the game? Input Multiple input cases. For each case, there are three integers n, m, k in a line. n and m describing the size of the grids is n ×m. k means there are k positions of which you must take their numbers. Then following n lines, each contains m numbers, representing the numbers on the n×m grids.Then k lines follow. Each line contains two integers, representing the row and column of one position and you must take the number on this position. Also, the rows and columns are counted start from 1. Limits: 1 ≤ n, m ≤ 50, 0 ≤ k ≤ n × m, the integer in every gird is not more than 1000. Output For each test case, output the highest score on one line. Sample Input 2 2 1 2 2 2 2 1 1 2 2 1 2 7 4 1 1 1 Sample Output 4 9

用java实现这个计算器为什么不能用(点击按钮为啥没反应),求大神解答??

import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextField; public class Calculate implements ActionListener{ String s="";//数字存入这个变量 String s1="";//保存运算符 String s2="";//用于显示; JTextField jt=new JTextField(20); String z="+,-,*,/"; String z1="0,1,2,3,4,5,6,7,8,9,."; double d;//用来存储运算符左边的数 public void actionPerformed(ActionEvent e){ String s3=e.getActionCommand(); if(s3.contains(z1)){ s=s+s3; s2=s; jt.setText(s2); } if(s3.contains(z)){ d=Double.parseDouble(s2); s="";//清零 s1=s3;//存入运算符 } if(s3.equals("=")){ if(s2.equals("+")){ s2=(d+Double.parseDouble(s))+"";//实现加法 } if(s2.equals("-")){ s2=(d-Double.parseDouble(s))+"";//实现减法 } if(s2.equals("*")){ s2=(d*Double.parseDouble(s))+"";//实现乘法 } if(s2.equals("/")){ s2=(d/Double.parseDouble(s))+"";//实现除法 } jt.setText(s2); s="";//运算结束清零 } } public Calculate(){ JFrame jf=new JFrame("Calculate"); JPanel p=new JPanel();//面板 JButton[] b=new JButton[16]; GridLayout grid=new GridLayout(4,4); String[] lab={"7","8","9","+", "4","5","6","-", "1","2","3","*", "0",".","/","=" }; for(int i=0;i<b.length;i++){ b[i]=new JButton(lab[i]); p.add(b[i]); b[i].addActionListener(this); } p.setLayout(grid); jf.add(jt,BorderLayout.NORTH); jf.add(p); jf.setResizable(false); jf.setLocation(300,200); jf.pack(); jf.setVisible(true); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } public static void main(String[] args){ new Calculate(); } }

牵引计算纵断面化简Java程序求化简,搞不明白,能不能求大佬帮忙化简修改,整的和原来的输出界面不一样一些

package bean;//import的是加载进去要引用到的Java包,即要调用的方法 import java.util.ArrayList; import java.util.List; import javafx.application.Application; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class View extends Application{ //调用Application包,下面main主方法块launch的功能要调用 public void start(Stage primaryStage){ Pane Pane = new Pane();//面板 VBox vBox = new VBox(10); //竖框 vBox.setAlignment(Pos.CENTER); //居中 Label topLable = new Label("纵断面化简");//顶端标签 vBox.getChildren().add(topLable); //竖框添加顶端标签 HBox hBox0 = new HBox(30); //横框 Label titleLable1 = new Label("坡度千分数");//数据名称标签 Label titleLable2 = new Label("坡长"); Label titleLable3 = new Label("轨道标高"); Label titleLable4 = new Label("处理方式(化简为同一坡段的选同一数字)"); titleLable1.setPrefWidth(75);titleLable2.setPrefWidth(75); //调整界面格局 titleLable3.setPrefWidth(75);titleLable4.setPrefWidth(300); hBox0.getChildren().addAll(titleLable1,titleLable2,titleLable3,titleLable4); //横框加title vBox.getChildren().add(hBox0); //竖框加title横框 for(int i = 0; i<15;i++)//调用静态方法添加15行三个文本域一个组合框的行 addInput(vBox); Button bt = new Button("化简计算");//触发按钮 vBox.getChildren().add(bt); //添加触发按钮进竖框 TextArea ta = new TextArea();//添加文本区域输出结果 ta.setPrefWidth(200); //调整界面格局 vBox.getChildren().add(ta); //添加输出文本区域进竖框 bt.setOnAction(e -> {//写按钮作用 // 创建一个list集合存放坡段对象 List<Section> list1 = new ArrayList<>(); // 定义一个集合用来存放处理方式 List<String> list2 = new ArrayList<>(); // 定义一个数组用来存放每行获取的输入数据 double[] d = new double[3]; for (int v = 0; v < 15; v++) { HBox indexHbox = new HBox();// 获取整个框对象 indexHbox = (HBox) vBox.getChildren().get(v);// 获取第一行输入框的数据 for (int h = 0; h < 3; h++) { TextField t = new TextField();// 获取输入框对象 t = (TextField) indexHbox.getChildren().get(h); // 获取该输入框的数据 ouble i = Double.parseDouble(t.getText());// 将数据转化为double类型 d[h] = i;// 放入数组中 } // 创建一个坡段对象 Section section = new Section(d[0], d[1], d[2]);// 取出数组中的数据作为参数构造section对象 // 将section加入list list1.add(section);// 将section对象加入list1 // 获取处理方式的参数 ComboBox<String> c = new ComboBox<>();// 获取下拉框对象 c = (ComboBox<String>) indexHbox.getChildren().get(3);// 得到该行下拉框的值 list2.add(c.getValue());// 将值存到list2 } //定义几个集合分别用来放同一化简的坡段 List<Object> list3 = new ArrayList<>(); List<Object> list4 = new ArrayList<>(); List<Object> list5 = new ArrayList<>(); List<Object> list6 = new ArrayList<>(); List<Object> list7 = new ArrayList<>(); List<Object> list8 = new ArrayList<>(); List<Object> list9 = new ArrayList<>(); for(int j=0;j<15;j++){ switch(list2.get(j)){ case "不进行化简"://如果下拉框选的是"不进行化简"则不进行处理 break; case "1": list3.add(list1.get(j));//如果下拉框选的是"1"则添加到list3 break; case "2": list4.add(list1.get(j));//如果下拉框选的是"2"则添加到list4 break; case "3": list5.add(list1.get(j));//如果下拉框选的是"3"则添加到list5 break; case "4": list6.add(list1.get(j));//如果下拉框选的是"4"则添加到list6 break; case "5": list7.add(list1.get(j));//如果下拉框选的是"5"则添加到list7 case "6": list8.add(list1.get(j));//如果下拉框选的是"6"则添加到list8 break; case "7": list9.add(list1.get(j));//如果下拉框选的是"7"则添加到list9 break; default:break; } } //要化简为同一坡段的几个坡段进行化简 Calculate calculate = new Calculate();//创建计算对象 double i_h1 = calculate.getI_h(list3);//调用计算坡度千分数的方法 double sumL1 = calculate.getsumL(list3);//调用计算总坡长的方法 double i_h2 = calculate.getI_h(list3); double sumL2 = calculate.getsumL(list3); double i_h3 = calculate.getI_h(list3); double sumL3 = calculate.getsumL(list3); double i_h4 = calculate.getI_h(list3); double sumL4 = calculate.getsumL(list3); double i_h5 = calculate.getI_h(list3); double sumL5 = calculate.getsumL(list3); //结果输出 ta.appendText("1的化简结果:坡度千分数:"+i_h1+"\t坡长为:"+sumL1+"\n"); ta.appendText("2的化简结果:坡度千分数:"+i_h2+"\t坡长为:"+sumL2+"\n"); ta.appendText("3的化简结果:坡度千分数:"+i_h3+"\t坡长为:"+sumL3+"\n"); ta.appendText("4的化简结果:坡度千分数:"+i_h4+"\t坡长为:"+sumL4+"\n"); ta.appendText("5的化简结果:坡度千分数:"+i_h5+"\t坡长为:"+sumL5+"\n"); }); Pane.getChildren().add(vBox); //面板添加竖框 Scene scene = new Scene(Pane); //场景添加面板 primaryStage.setScene(scene); //界面添加场景 primaryStage.setTitle("纵断面化简");//界面命标题 primaryStage.show();//启动界面 } public static void addInput(VBox vBox){//静态方法添加一行三个文本域和一个组合框 HBox hBox1 = new HBox(30); TextField tf1_1 = new TextField(); TextField tf1_2 = new TextField(); TextField tf1_3 = new TextField(); tf1_1.setPrefWidth(75);tf1_2.setPrefWidth(75);tf1_3.setPrefWidth(75); ComboBox<String> cbo1 = new ComboBox<>(); cbo1.getItems().addAll("不进行化简","1","2","3","4","5","6","7");//给拉选框添加选项 hBox1.getChildren().addAll(tf1_1,tf1_2,tf1_3,cbo1); vBox.getChildren().add(hBox1); } public static void main(String[] args) { // TODO 自动生成的方法存根 launch(args);//启动界面类 } } //坡段类 package bean; public class Section { //定义一个坡段类,用于实例化线路上的断面 private double i; //坡度千分数 private double l; //坡长 private double h; //轨道标高 public double getH() { return h; } public void setH(double h) { this.h = h; } public Section(double i,double l,double h){ //坡段构造方法 super(); this.i = i; this.l = l; this.h = h; } public double getI() { return i; } public void setI(double i) { this.i = i; } public double getL() { return l; } public void setL(double l) { this.l = l; } @Override public String toString() { return "Section [i=" + i + ", l=" + l + ", h=" + h + "]"; } } //计算类 package bean; import java.util.ArrayList; import java.util.List; public class Calculate { // 计算化简坡道千分数 public double getI_h(List<Object> list1) { // 得到终点标高h2,始点标高h1 Section lastS = (Section) list1.get(list1.size() - 1); double h2 = lastS.getH(); Section firstS = (Section) list1.get(0); double h1 = firstS.getH(); // 获得坡长 double sumL = getsumL(list1); double I_h = 1000 * (h2 - h1) / sumL; return I_h; } // 计算总坡长 public double getsumL(List<Object> list1) { // 获得坡长 double sumL = 0; Section s = null; for (int i = 0; i < list1.size(); i++) { s = (Section) list1.get(i); sumL += s.getL(); } s = (Section)list1.get(0); return sumL-s.getL(); } }

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Intellij IDEA 实用插件安利

1. 前言从2020 年 JVM 生态报告解读 可以看出Intellij IDEA 目前已经稳坐 Java IDE 头把交椅。而且统计得出付费用户已经超过了八成(国外统计)。IDEA 的...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

魂迁光刻,梦绕芯片,中芯国际终获ASML大型光刻机

据羊城晚报报道,近日中芯国际从荷兰进口的一台大型光刻机,顺利通过深圳出口加工区场站两道闸口进入厂区,中芯国际发表公告称该光刻机并非此前盛传的EUV光刻机,主要用于企业复工复产后的生产线扩容。 我们知道EUV主要用于7nm及以下制程的芯片制造,光刻机作为集成电路制造中最关键的设备,对芯片制作工艺有着决定性的影响,被誉为“超精密制造技术皇冠上的明珠”,根据之前中芯国际的公报,目...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

百度工程师,获利10万,判刑3年!

所有一夜暴富的方法都写在刑法中,但总有人心存侥幸。这些年互联网犯罪高发,一些工程师高技术犯罪更是引发关注。这两天,一个百度运维工程师的案例传遍朋友圈。1...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《Oracle Java SE编程自学与面试指南》最佳学习路线图2020年最新版(进大厂必备)

正确选择比瞎努力更重要!

字节跳动面试官竟然问了我JDBC?

轻松等回家通知

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

实时更新:计算机编程语言排行榜—TIOBE世界编程语言排行榜(2020年6月份最新版)

内容导航: 1、TIOBE排行榜 2、总榜(2020年6月份) 3、本月前三名 3.1、C 3.2、Java 3.3、Python 4、学习路线图 5、参考地址 1、TIOBE排行榜 TIOBE排行榜是根据全世界互联网上有经验的程序员、课程和第三方厂商的数量,并使用搜索引擎(如Google、Bing、Yahoo!)以及Wikipedia、Amazon、YouTube统计出排名数据。

阿里面试官让我用Zk(Zookeeper)实现分布式锁

他可能没想到,我当场手写出来了

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

立即提问
相关内容推荐