学年

質問の種類

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

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
生物 高校生

(2)①〜④どなたか教えてください😭

5 酵母菌は酸素が高濃度の条件下では酸素呼吸を、貧酸素状態ではアルコール発酵を行うことで ATPを作り出している。 酸素呼吸には大きく分けて3つの過程がある。 最初に行われる過程は細 胞内の () で行われる (イ) である。 これは1個のグルコース分子を、(ウ) 個の化学式 CH4Os で表される (エ) 分子に変化させる過程である。 このとき、 (オ) 個の ATP 分子が作り出される。 酸素存在下では、 (エ) はミトコンドリアに運ばれ、二つ目の過程である (カ)と三つ目の過程で ある (キ) が行われる (カ)はミトコンドリアの (キ)はミトコンドリアの (ケ)で行 われる。 しかし、貧酸素状態では (イ) グルコースから離れた (コ) 原子を酸化してエネルギ ーを得ることができない。 そこで、(コ) 原子を (エ) と化合させるのだが、このときグルコース 子あたりに(サ) 個の (シ)の分子が遊離し、排出される。 文中の空欄 (ア)~(シ)に最も適切な語・数字を入れ、文を完成せよ。 (2) 酵母菌を酸素の少ない状態で培養したところ、 2molのブドウ糖が分解され、 3.6mol の酸 素が消費された。 ① このとき、アルコール発酵で消費されたブドウ糖は何molか求めよ。 ②このとき、アルコール発酵で発生した ATP は何molか求めよ。 ③ このとき、アルコール発酵で発生したアルコールは何グラムか求めよ。 ただし原子量は H=1、C=12,016 とする。 ④ このとき発生する全ての (シ) は何molか求めよ。

回答募集中 回答数: 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 次の英文を読み, 空所に入れるのに最も適切なものを,それぞれ下の①~④のうちから一つずつ選びなさい。 (6) When growing tomatoes, we know we should pick them when they're bright red. With carrots, however, ( 6 ) because they grow underground. ①we should pick them when they turn orange (2) it's hard to know when they're ready (3) we should grow them more carefully than tomatoes (4) it's easy to know when they're bright red (7) Although it is quick, easy and convenient to be able to look up information on the internet, it can sometimes be difficult ( 7 ) because there is so much information. to find what you are looking for (2) to improve the convenience of the internet (3) to get more than what you need that people often experie (4) to have good computer literacy (8) Would you be happier if you were richer? Many people believe that they would be. But research conducted over many years suggests that ( 8 ). People in the United States, for example, are, on average, richer than New Zealanders, but they are not happier. poorer people tend to worry about their financial problems 2 pleasure in life usually comes from great wealth (3) the best way to be happy is learning how to save money greater wealth doesn't generally imply greater happiness (9) Many European rivers were once heavily polluted by manufacturing industries. As a result, wild animals dependent on clean water disappeared. However, as stricter environmental standards took effect, rivers such as the Thames of London have become much cleaner. Consequently, ( 9 ). water quality has continued to decline wild animals avoid drinking from the Thames (3) wild animals are making a comeback in many rivers (4) wild animals no longer depend on clean water

回答募集中 回答数: 0
情報:IT 高校生

情報:高3 [ウ]の部分がなぜ③になるのか分かりません。 iが 1〜kazu-1 になるから jは 0〜kazu-2 までは考えられたのですが、ここから kazu-2 が kazu-1-i になるのはなぜでしょうか、、教えてください🙇🏻

次の生徒 (S) と先生 (T) の会話文を読み, 空欄 ア 解答群のうちから一つずつ選べ。 キ に入れるのに最も適当なものを、後の SAG (A) (6) T:データを昇順または降順に並べ替えるアルゴリズムのことをソートといいます。まずはじめに、バブルソー トというアルゴリズムを考えてみましょう。バブルソートは、配列の中の隣り合うデータの大小を比較し交 換を繰り返す方法です。 図1は、10個の要素を持つ配列 Data に対してバブルソートを行う場合の流れを 表しています。 グラムの4258 まず、配列の先頭とその次の要素を比較し,左の方が大きければ右と交換する。これを一つずつずらしなが ら配列の最後尾まで繰り返していき、最後尾まで繰り返したら1周目の比較が終了します。 S: つまり, 1周目の比較がすべて終了した段階で、配列の最後尾にはア | が入っているのですね。 T:その通りです。 2周目は、配列のイ を除いて1周目と同じように比較していきます。 これを繰り返 して,最後には配列が並び変わっているという具合ですね。図2はバブルソートのプログラムを表してい ます。 その通りです (SI) し 配列 Data 77 52 89 48 97 3 18 62 33 29 1周目/ 1回目の比較 が配列の中 77 52 89 48 97 3 18 62 33 29 交換する 1周目/ 2回目の比較 52 77 89 48 97 3 18 62 33 29 交換しない 4357 1周目/3回目の比較 52 77 89 48 97 交換する 3 18 62 33 29 図1 配列 Data に対するバブルソートの流れ 国の (1) (2) (3) (4) (5) (6)b Data = [77,5289,48,973 18,62,33,291 kazu= 要素数 (Data) JRS pin iを1からkazu-1まで1ずつ増やしながら繰り返す: inshid jを0から ウ まで1ずつ増やしながら繰り返す: もしData[j] > Data [j + 1] ならば: hokan エ Data[j] ① <[abia] ada rabid k == [abis) stad 0000 Data(+11 Anda > (7) (8) (7) Data[j + 1] = hokan 図2 バブルソートのプログラム (hidaes mig) S:図2のプログラムだと, もし仮に最初からデータが昇順に並んでいても, 配列 Data の場合と同じ回数だけ 比較を繰り返さないといけないですよね? T:いいところに気が付きましたね。 最初から昇順に整列された配列をバブルソートすると、交換回数は オ だけど比較回数は ので効率が悪いです。 それでは, データの整列が完了した段階で繰り返 しを抜けるように図1のプログラムを修正してみましょう。 まず, 変数 koukan を用意して初期化してお きます(図3の (3) 行目)。 次に, 交換が発生した場合, 変数 koukan に 「1」 を代入するようにしましょ (図3の (10) 行目)。 さて、ここで図4のプログラムを,図3のプログラムのどこに挿入すればいいか 分かりますか? S:繰り返しが1周終わるごとに変数 koukan の値を確認する必要がありますから、 T: 正解です! よくできました。 キ だと思います。 98 第3章 コンピュータとプログラミング もし kouk

回答募集中 回答数: 0