学年

質問の種類

情報 大学生・専門学校生・社会人

Oracle certified Java Programmer Gold SE11 IT系ベンダー資格のOracle certified Java Programmer Gold SE11の資格勉強をしているのですが、もし、Javaに詳しい人がいるのでしたら、 第6章... 続きを読む

8. 次のコードをコンパイル、 実行したときの結果として、正しいものを びなさい。 (1つ選択) } var sql = "select * from item where id = ?": try (var ps = con.prepareStatement (sql)){ ResultSet rs = ps.executeQuery(); // do something 0件の検索結果が戻される 11. 次のコードをコンパイル、実行したときの結果として、正しいものを選 びなさい。(1つ選択) var sql = "select * from emp"; try (PreparedStatement ps = con.prepareStatement(sql){ ResultSet rsps.executeQuery(); System.out.println(rs.getString(2)); なお、 検索する対象となるempテーブルは、以下のレコードが登録さ れているものとする。 DEPARTMENT A. B. 全件の検索結果が戻される C. コンパイルエラーが発生する D. 実行時に例外がスローされる ID NAME 1 ALLEN R&D A. B. executeQueryメソッド C. executeメソッド D. executeBatch メソッド メソッドとして、最も適切なものを選びなさい。 (1つ選択) executeUpdate メソッド 19. JDBCを使ったデータベースプログラミングをしている。 UPDATE文を 実行した結果、 何件更新されたかを調べたい。 PreparedStatementの P314 2 SCOTT SALES 3 BILL ACCOUNTING A. 「1」 と表示される Marit B. 「2」 と表示される C. 「ALLEN」 と表示される D. 「SCOTT」 と表示される E. コンパイルエラーが発生する F. 実行時に例外がスローされる 第6章 JDBCによるデータベース連携 (問題) <->P316 P314 10. 次のコードをコンパイル、 実行したときの結果として、正しいものを選 びなさい。 (1つ選択) var sql = "delete from item where id = ?"; try (var ps = con.prepareStatement(sql))( ps.setInt(1, 1); ps.executeUpdate("update item set name="test' where id = ?'); 12. 次のコードをコンパイル、 実行したときの結果として、正しいものを選 びなさい。 (1つ選択) var sql = "select count(*) from item"; try (PreparedStatement ps = con.prepareStatement(sql)){ System.out.println(ps.execute()); なお、検索する対象となるitemテーブルは、以下のレコードが登録さ れているものとする。 A. DELETE文が実行される id name 1 B. UPDATE文が実行される banana 2 C. コンパイルエラーが発生する apple 3 D. 実行時に例外がスローされる P316 orange 298 ※次ページに続く 299

回答募集中 回答数: 0
英語 高校生

教えてほしいです

3 次の英文を読み, 空所に入れるのに最も適切なものを, それぞれ下の①~④のうちから一つずつ選びなさい。 Cigarette smoking has negative effects not only on the body of the person who smokes but also on the body of someone who regularly breathes in second-hand smoke. Some of the most obvious effects are high blood pressure, sleep disorders, heart failure, and lung cancer. Despite such harmful consequences, ( 10 ). It has been reported that smoking creates feelings of pleasure, reduces tension, and promotes close relationships. Many smokers admit that smoking is a bad habit. ( 11 ), they tend to think that the number of cigarettes that they smoke is below the danger level and thus are not worried about the risk. Some even feel that they do not breathe in the smoke and that a cure for cancer will be found before they become ill with the disease. We have to admit that smoking is a habit which is difficult to break ( 12 ) the nicotine found in tobacco goes into the blood and stimulates the brain, making smokers feel pleasant for several minutes. What is more, the smoker usually feels anxious and wants to have another cigarette. ( 13 ) the policies that now ban smoking in most public areas, the stress that people often experience at work and at home can force them to smoke. ( 10 ) ①some people decide to stop smoking millions of people continue to smoke ( 11 ) the price of cigarettes has risen ①smoking is more harmful than drinking Therefore 2 While ③ Of course 4 However (12) 1 because 2 as a result 3 but SO (13) ①Despite 2 Although (3) But 4 Yet

回答募集中 回答数: 0
数学 高校生

開設の2・3行目の左辺は何を表しているのですか?

476 基本 41 隣接3項の漸化式 (1) 次の条件によって定められる数列{a} の一般項を求めよ。 0000 P.475 基本事項■ 解答 (1) α1=0, a2=1, an+2=an+1+6am (2) α11=1, a2=2, an+2+40n+1-5an=0 指針 まず+2 をx, anti を x, an を1とおいたxの2次方程式 (特性方程式)。 その2解をα, β とすると, αβのとき In+1 ants-aan+=(anti-aan) ans. Bana(ann-Bar) が成り立つ。この変形を利用して解決する。 ® (1) 特性方程式の解はx=-2, 3→解に1を含まないから、 A を用いて2 表し,等比数列{an+1 +2an}, {an+1-3a} を考える。 (2) 特性方程式の解は x=1, 5→解に1を含むから,漸化式は an+2-Qn+1=-5(4n+1-αn) と変形され, 階差数列を利用することで解決できる。 (1) 漸化式を変形すると an+2+2an+1=3(an+1+2a) an+2-3an+1=-2 (an+1-3an) ①, ①より, 数列{an+1+2an} は初項a2+2a1= 1, 公比3の 等比数列であるから an+1+2an=3n-1 ②より, 数列{an+1-3an} は初項α2-3a1= 1, 公比-2 の等比数列であるから an+1-3an=(-2)"-1. ④C x=x+6を解くと、 (x+2)(x-3)=から x=-2,3 α-2,B=3として 針の人を利用。 基本 次の ③ ④ から 5an=3"-1-(-2)"-1 したがって an= -{3"-1-(-2)"-1} 5 (2) 漸化式を変形すると an+2-an+1=-5(an+1-an) で ゆえに, 数列 {an+1-an} は初項α2-a1=2-1=1, 公比 -5の等比数列であるから an+1-an=(-5)-1 よって, n≧2のとき k=1 13. 1・{1-(-5)"-1} 1-(-5) (8-8)- n-1 an=a+2(-5)=1+ (7-(-5)) n=1 を代入すると, 1/3 (7-(-5)") =1であるから,上の an+1を消去 x2+4x-5=0を解くと (x-1)(x+5)=0から x=1, -5 別解 漸化式を変形して an+2+5an+1=+1+5, よって+1+5an =an+50-1 & & &=......= α₂+50 an+1+5a=7 を変形し 7 an+1- 合 式はn=1のときも成り立つ。 したがってan=1/12 (7-(-5)^-'} an - 76 7-6 .. a.=(7-(- an Ad

未解決 回答数: 0