我是这个java源文件:
javap -c -v t
我编译它并按预期工作。 Here Integer
的输出,我无法在其中找到lambda的位置。哪里有字节码告诉jvm每当输入lambda时用输入package MoinPrograms;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class MouseOverActions {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("https://www.flipkart.com/");
driver.manage().timeouts().implicitlyWait(3000, TimeUnit.SECONDS);
driver.findElement(By.xpath("// button [@class=\"_2AkmmA _29YdH8\"]")).click();
driver.findElement(By.xpath("//p [@class=\"_1AuloC\"and text()= \"Mobiles & Tablets\"]")).click();
Set<String> FlipKart = driver.getWindowHandles();
Iterator<String> k = FlipKart.iterator();
while(k.hasNext()){
String handle1 = k.next();
System.out.println(handle1);
}
}
}
来计算表达式?
答案 0 :(得分:4)
如果您想查看lambda正文+------+----+----+-----+----+
| col1 |col2|col4| col3|col5|
+------+----+----+-----+----+
|abc | c |cat | h|hat |
|abc | c |cat | h|hat |
|abc | c |cat | h|hat |
+------+----+----+----+-----+
的代码,请致电a*a+2*a+1
以查看私有方法:
javap -c -v -p t
关于lambda内部实现的更详细的答案在这里:How will Java lambda functions be compiled?