学年

教科

質問の種類

資格 大学生・専門学校生・社会人

この問題の2行目sbというのはなんでしょうか。 文字型sという箱の中にABCDという値が入っていて、 StringBuffer:sb←stringBuffer(s) sbという箱の中をABCDで初期化するという意味かと思ったのですが メンバ変数とかメソッドとかを説明してる枠... 続きを読む

ワグラム中の 問 11 次の記述中の [7] オブジェクト指向 頭の位置は1である。 (4)として Catsb 解説 p. 158 クラス StringBuffer は文字列処理を行うクラスである。 クラス StringBuffer a 図に示す。 に入れる正しい答えを, 解答群の中から選べ。 ここで、文字の先 明を ある。 関数 stringProcessing を stringProcessing ("ABCD") として呼び出すと, 戻り値はで ()tignod 型 説明 メンバ変数 文字列型 格納する文字列。 str 説明 コンストラクタ StringBuffer (文字列型: str) (Linersqlstsb. メソッド 戻り値 引数 strでメンバ変数 str を初期化する。 説明 append(文字列型: str) StringBuffer メンバ変数 str の末尾に引数 str を追加し,イ ンスタンスへの参照を返す。 delete(整数型: start, StringBuffer メンバ変数 str の start 番目からend - 1番 目まで削除し, インスタンスへの参照を返す。 メンバ変数 str を返す。 整数型: end) toString() 文字列型 TIDNA replace (整数型: start, StringBuffer メンバ変数 str の start番目から end 整数型 end, 文字列型: str) lastIndexOf( 整数型 文字列型: str) 目の部分文字列を引数 str に置換し, インス inersqtiqson タンスへの参照を返す。 tibne メンバ変数 str を検索し, 引数 strが最後に出 現する、先頭からの文字位置を返す。見つか らない場合は-1を返す。 図 クラス StringBuffer の説明 ISASE [プログラム] 1: ○整数型: stringProcessing (文字列型:s) 2: StringBuffer: sb ← StringBuffer(s) 3: sb ←sb.append("ABCD").delete(4, 6) 4: sb ← sb.append(sb.delete(2, 3).toString()).replace(3, 4, "D") 5: return sb.lastIndexOf("CD") 第1部 予想 ided ist ge 01508300 金を

解決済み 回答数: 1
TOEIC・英語 大学生・専門学校生・社会人

わからないので答えを教えてもらいたいです。

英語 Amy: Hey Jake, I was thinking about online shopping this weekend. Do you shop online often? Jake: Yeah, I do it quite a bit. It's so ( house and you can ( ) almost anything online. That's true. I love the convenience, too, especially with a busy schedule. But I've heard there are some downsides to it. What do you think? Well, one obvious downside is not being able to ( ) or try the product before buying. Sometimes, what you see on the website isn't exactly what you get. Amy: Yeah, that's a good point. I've had a couple of instances where the color or size was ) from what I expected. ( Another thing is the shipping time. Even with express shipping, you might have to ( ) a few days for your stuff to arrive. It's not great if you need Amy: Jake: Jake: Amy: Amy: Jake: Jake: Jake: something urgently. True, waiting can be frustrating. But what about the ( that sometimes the prices are higher online. It depends. I've found some great deals online, especially during sales. But you're right; in some cases, the prices can be a bit inflated, and you might end up paying more than if you bought it in-store. Amy: And returns can be a hassle, too. I had to return a shirt once, and the process took forever. It's not as easy as just going to a store and returning it on the spot. Yeah, returns can be a pain. Also, there's the whole security issue. You must be careful about where you're buying from to avoid scams or stealing your ( ). Amy: Oh, definitely. I always make sure the website is secure before entering any payment details. 日本語 L ), you know? No need to leave the On the bright side, online ( ) can be super helpful. I always check them before making a purchase. It gives you an idea of the product's quality and whether it's worth the money. Amy: That's a good point. I do the same. It's like having the opinions of a bunch of friends who've already ( ) the product. Jake: Exactly. So, while there are some drawbacks, I think the ( ) of online shopping, like the convenience and variety, outweigh the ( ) for me. Yeah, I agree. It's all about finding a balance and being cautious about where and what you're buying. )? I've heard

回答募集中 回答数: 0
1/11